Change homepage in Chrome browser from extension

Does anyone know how to change the user's homepage in Chrome browser from Chrome Extension? I tried some solutions like document.setHomePage but it does not work.

In fire fox, I use prefs.setCharPref ('browser.startup.homepage', searchUrl); and it works.

Any suggestions?

Thank.

+5
source share
1 answer

The closest thing currently available allows your extension to override the "new tab" page . include this in your manifest:

{
  "name": "My extension",
  ...

  "chrome_url_overrides" : {
    "newtab": "myPage.html"
  },
  ...
}

However, your users can set their new tab to any other URL as their home page.

+3

All Articles