You can do it on your PC by enabling chrome://flags/#extensions-on-chrome-urls
and adding the necessary url, chrome://extensions/
, into "matches"
in manifest.json but such extension won't be possible to install on a normal browser due to an invalid scheme error.
To avoid the fatal error, don't use manifest.json to inject the content script/style, do it manually in the background or popup script via chrome.tabs.insertCSS
or chrome.tabs.executeScript
:
chrome://flags
: enable Extensions on chrome:// URLs
flag
manifest.json:
"permissions": ["chrome://*/*", "tabs"],
"background": {
"scripts": ["background.js"]
},
background.js:
var chromeURLstylable;
chrome.permissions.contains({origins: ["chrome://*/*"], permissions: ["tabs"]}, function(state) {
chromeURLstylable = state;
console.log("chrome:// urls support", state);
if (chromeURLstylable) {
chrome.tabs.onUpdated.addListener(function(tabId, info, tab) {
if (info.status == "loading" && tab.url.indexOf("chrome://") == 0) {
chrome.tabs.insertCSS({
file: "style.css",
runAt: "document_start",
allFrames: true
});
}
});
}
});
Beware of possible problems submitting such extension to the Chrome Webstore.