718 questions
0 votes
1 answer
54 views
Can't use storage.local.set from content_scripts in Safari
I have a browser extension that I'm trying to port on Safari. On some devices/version of the browser (mainly on mobile versions), the following code will throw an error: await chrome.storage.local.set(...
0 votes
1 answer
70 views
InboxSDK `registerComposeViewHandler` not firing for **inline** replies (works only when reply is popped out)
I’m building a Chrome extension for Gmail using InboxSDK v2. My registerComposeViewHandler works perfectly when I click Pop out reply (the floating compose window), but it never fires for an inline ...
0 votes
0 answers
152 views
Architecture Google extension for integration Gmail website with a CRM
I will try to give as much details I can about this project. First of all sorry about my English because it's not my native language. It's not directly a question, is about your opinion for the ...
21 votes
3 answers
8k views
Optionally inject Content Script
Content Script can be injected programatically or permanently by declaring in Extension manifest file. Programatic injection require host permission, which is generally grant by browser or page action....
0 votes
0 answers
109 views
How to prevent Chrome from downloading a file when intercepted via a content script in Manifest V3?
Prevent Chrome Native Downloads for Intercepted Links in Manifest V3 Extension I'm building a Chrome extension using Manifest V3 to intercept file download links (like .zip, .exe, .mp4, etc.)—...
6 votes
2 answers
1k views
How to match all domain extensions in content script (firefox)?
I need to match all domain extensions for a simple Firefox extension I am writing. For example, I need to the extension to run on: https://example.com https://example.org https://example.net I do ...
1 vote
1 answer
5k views
Error: Not allowed to define cross-origin object as property on [Object] or [Array] XrayWrapper
How can I avoid the following error and why do I get it? Edit: Maybe I have to ask how I can make objects from a privileged scope visible to a less privileged scope. My goal is to export/return ...
61 votes
2 answers
168k views
How to postMessage into iFrame?
I am developing a Chrome extension to use with my own Web-application, processing Web-pages (including cross-domain ones), loaded into iFrame on my application's main page. So I have to send message, ...
57 votes
4 answers
59k views
How to get a content script to load AFTER a page's Javascript has executed?
My extension is supposed to load a content script, searchTopic.js, only after the page it's injected into has already fully loaded (yes, I have set "run_at" to "document_end" in the extension manifest)...
0 votes
0 answers
40 views
Content script stops listen to background script after some time (Safari)
My extension is designed to control music playback on the music.yandex.by web-site. When user click buton in popup I am passing message from background to content script. While the music is playing, ...
1 vote
0 answers
115 views
Content script can't open a WebSocket connection in Firefox
Dev tools of the site, dev tools of the service worker and background.js can open a websocket connection perfectly fine. The content scripts however, will trigger onerror, then onclose immediately. I ...
0 votes
1 answer
581 views
ContentScript.js in chrome extension , is not listening for "message" from background.js
I am simply sending this message from background to contentScript , The content is supposed to listen for this message and execute the function . My contentScript.js : function clickButton() { const ...
0 votes
0 answers
51 views
Chrome extension with React and Webpack - Injection of react into page
So I have this project with React 19 and typescript and am using Webpack to compile my code. I have successfully added react to pop-up, but I have problems when I compile my content script (overview....
0 votes
0 answers
103 views
Scripts added with chrome.scripting.registerContentScripts don't inject until a popup is opened
So I have a Chrome Extension that I need to update to MV3 that involves injecting Content Scripts. Via a popup the end user should be able to enable / disable which scripts should be injected, with ...
0 votes
1 answer
210 views
Uncaught (in promise) Error: Could not load file '/public/content-script.bundle.js'. It isn't UTF-8 encoded. Using chrome.scripting.executeScript
Goal I am trying to create a Chrome extension that will embed a CodeMirror Editor in the web page. I use vite for bundling the CodeMirror package and use chrome.scripting.executeScript to run my ...