Some browsers like OperaGX block overwriting the default "New Tab" page. With a little trick, you can bypass this restriction. This repo contains instructions that make it relatively easy to implement it in your own extension.
If the repo helps you, I would appreciate a star on GitHub. If you use the script in your extension, I would appreciate an attribution or a donation.
-
Drag the
newTab-override.js
file into your project. -
Modify the
tabURL
variable (line 4) to your needs. -
Inside your extensions
manifest.json
add the following line to thebackground
property:
"service_worker": "newTab-override.js"
- Inside your extensions
manifest.json
add the following line to thepermissions
array:
"tabs"
It should now look similar to this:
...
"background": {
"service_worker": "newTab-override.js"
},
"permissions": ["tabs"]
...
❗Don't forget to reload your extension❗
That's it! When you now open a new tab
Feel free to open a pull requests if you feel that you made useful changes to the repo. Whether it's fixing typos, implementing new features, or anything else.
I appreciate all contributions!
- Override new tab page
- Tested on manifest v2 & v3
- Add browser check (script will not execute on browsers that don't need it)
Many more coming soon...