New tab extension and redirect url chrome-search://local-ntp/local-ntp.html

645 views
Skip to first unread message

Robbi

unread,
Mar 4, 2023, 12:12:25 PM3/4/23
to Chromium Extensions
Hi developers,
I'm migrating my last remaining MV2 extension.
It's a private extension that modifies the browser's new tab (with chrome_url_overrides) and provide a set of functions accessible only within the company I work for.
In the options\settings page there is a radio button with which I allowed the user to restore the browser home page without disabling the extension (in this case, the aforementioned functions would always be accessible via the browserAction).
In practice, if the user wants to go back to seeing the old home page, I redirect him to the url: chrome-search://local-ntp/local-ntp.html
This url always worked with browsers like: Chrome, SRWare Iron, MS Edge, FlashPeak Slimjet, Comodo Dragon.
Only today, however, I realized that this url doesn't work with the Brave browser (quite well known) and with Naver Whale (a little known, but very interesting browser of Korean origin!).
My question is: Is there a way to know the equivalent urls in these browsers, if they exist?
P.S. I tried something like   brave-search://local-ntp/local-ntp.html   but it doesn't work :-(
TIA

Jackie Han

unread,
Mar 4, 2023, 6:58:14 PM3/4/23
to Robbi, Chromium Extensions
I don't know the answer, but it's a hacking way. You can try asking on these browsers' community forums or GitHub.

But your need is another instance that browsers should allow override as an optional behavior instead of forceable binary behavior.
In the past, I have expressed this need. https://github.com/w3c/webextensions/issues/111

 By the way, 
It's a private extension and only within the company I work for.
 Your company use so many different browsers?

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/cf0fe8ea-723f-4eae-ad47-e187ce7a74adn%40chromium.org.

Robbi

unread,
Mar 4, 2023, 9:30:28 PM3/4/23
to Chromium Extensions, Jackie Han, Chromium Extensions, Robbi
Hi Jackie and thank you for your reply.
The choice of browser is free for the employee. However, it is recommended to keep your browser updated if it does not update itself.
I realize that what I do can actually be considered almost hacking, but how could the reverse thing be implemented as you suggest?
Reversing the logic, every time the user opens a new tab the code should redirect to an extension page (which should be the original override page),
while if the user doesn't accept the alternative page when it opens a new tab the code should do nothing.
In this way, however, the address bar would not be empty and ready to receive a new url or a query for the default search engine,
but it would already be written with something like: chrome-extension://<ext-id>/newpage .html
Your proposal to make overriding optional is interesting; i will monitor that thread!
Reply all
Reply to author
Forward
0 new messages