Does anyone know how to change the user's Home page in Chrome Browser from Chrome Extension?
I tried some solutions like document.setHomePage
but it doesn't work.
In firefox, I am using the following code:
prefs.setCharPref('browser.startup.homepage', searchUrl);
Any suggestions?
Thanks.
Just go to the 'Shortcuts' dialog in the Customize menu. Open a new tab. At the bottom right, click Customize. Click Shortcuts.
The closest thing currently available is allowing 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 may set their new tab page to any other url as their home page.
It is now possible to override the homepage through the chrome_settings_overrides
option:
{
"name": "My extension",
...
"chrome_settings_overrides": {
"homepage": "http://www.homepage.com",
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With