How can you run the script even in blank tabs?
Content scripts do not run in about:
pages by default, even with <all_urls>
specified. To make content scripts run in about:blank
, you must specify it explicitly with match_about_blank
.
...
"content_scripts": [ {
"js": [ "content.js" ],
"matches": [ "<all_urls>" ],
"match_about_blank": true
} ],
...
Be aware that the content script cannot be made to run in any other about:
page, including about:newtab
, which is what new tabs are (not about:blank
).