Hello all, I'm building a chrome extension that generates a quote, in response to a user's emotions.
My chrome extension involves the usage of a content-script that modifies the user's active browser window, by using DOM and JS to insert an overlay over the screen. The above picture shows this.
However, I noticed that my chrome extension doesn't work on chrome:// based URLs (example: chrome://extensions/ and chrome://newtab).
It throws the following exception:
Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist.
It works everywhere else and doesn't throw this exception.
I saw that in a similar StackOverflow post, chrome extension do not work after execute extension in url chrome://, and through some research online, Google Chrome won't allow to run extensions whose behavior involves modifying chrome's settings and functionality.
Does this apply to my extension's case? Is there a way I can get around this? I have posted below my chrome extension's manifest.json file. Ideally I'd like my extension to at least be able to run on chrome://newtab . I would really appreciate insight on this matter.
manifest.json
{
"manifest_version": 3,
"name": "Quotr",
"description": "A Quote Generator Chrome Extension",
"version": "1.0",
"permissions": [
"tabs",
"activeTab"
],
"action": {
"default_popup": "popup/popup.html",
"default_icon": "icons/QuotrPicture.png"
},
"content_scripts": [
{
"matches": [
"<all_urls>"
],
"js": [
"scripts/content-script.js",
"quote-display/quote-display.js"
]
}
]
}