Using "chrome_url_overrides" for extension
-
blurrydj last edited by
Hi there,
i whant to make an extension, which overrides the standard "newtab" page. There is a manifest key for that, called "chrome _url_overrides".
But when i use it, an error-message appears: "'chrome__url_overrides' is not allowed for specified extension ID."Now i'm not sure if opera doesn't allow that in general, or if there is a way to "activate" it. In Chrome the same extension works just fine.
-
burnout426 Volunteer last edited by burnout426
I just ran into this issue when trying to use the Chrome version of FVD Speed Dial in Opera (installed with the Install Chrome Extensions extension ). The extension works fine, but it doesn't override the new tab page.
In the extension's manifest file is:
"chrome_url_overrides": { "newtab": "newtab.html" }
But, that doesn't do anything as Opera's new tab page is "startpage" instead. But, if I change "newtab" to "startpage", I get the error mentioned in the OP.
I can work around it by closing Opera and editing its preferences file. This needs to be under "Extensions".
"chrome_url_overrides" : { "startpage" : [ { "active" : true, "entry" : "chrome-extension://llaficoajjainaijghjlofdfmbjpebpa/newtab.html" } ] }
However, in Chrome, that gets created automatically (with "newtab" instead of "startpage" obviously). In Opera it doesn't.
So, I'm not sure if Opera actually supports the override from the manifest file.
In the Opera version of FVD speed dial (which isn't kept up to date I think), I see a workaround in "js/bg/newtab_replace.js" which just replaces Opera's startpage tab every time one loads with the extension's newtab.html page.
In short, I would guess that Opera is blocking the override from the manifest file.
-
A Former User last edited by
Use "webnavigation" and direct it to the extension page...
There's other possibilities too.https://dev.opera.com/extensions/web-navigation/
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/webNavigationI guess this is defunct?
https://dev.opera.com/extensions/speed-dial-api/
https://dev.opera.com/extensions/speed-dial-manual/
Or is it? That dev page seems like it needs an update. -
A Former User last edited by A Former User
Btw, Opera never supported chrome_url_overrides to this day. So there's always been some other way...
"permissions": ["speeddial"],
-
burnout426 Volunteer last edited by
@rudrick said in Using "chrome_url_overrides" for extension:
Use "webnavigation" and direct it to the extension page...
Were you able to get this to work? chrome.webNavigation.onBeforeNavigate doesn't fire when a new start page tab is opened with ctrl + t or the + button on the tab bar. If you navigate from another page view, the start page button or entering the URL, it'll fire though. So, it'll only work part of the time.
chrome.webRequest.onBeforeRequest doesn't fire for the startpage, so you can't block it and then use redirectUrl with it.
This method works, but it has a few downsides. The history issue could probably be fixed with the history api though, but haven't tried.