Hello!
I would like to add a custom new tab page feature in my extension, and this feature can be turned on/off by users. My extension has other features (like it has scripts to make login easier) so it does not make sense for me to tell the user to turn the extension off if they do not want a new tab page.
I have looked into the following approaches:
1. using "chrome_override_url" & redirecting the user to "chrome-search://local-ntp/local-ntp.html" when a value in the storage indicates that I should not show custom page
Problem: If the user wants to use another new tab extension with my extension enabled, it does not work as they will be redirected to the default home page
2. Using chrome.tabs.onCreated and redirecting the user to my customized page using:
chrome.tabs.update(
tab.id, { url:chrome.extension.getURL("newtab.html") })
when they opt into my custom new tab page.
Problem: The URL bar shows the location of the "newtab.html" file which is a bit awkward
Is there any other way I can implement this without making a new extension?
Thanks!