718 questions
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
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
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.)—...
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, ...
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 ...
0 votes
2 answers
220 views
Chrome plugin content script cannot access all window objects?
I'm trying to fetch an object from the current page window via a content script. The object itself is available if I log the window/this object but when I try to access it via the content script it ...
0 votes
0 answers
35 views
Content script not loading for custom file type
Lets say for example .custom. Whenever I am opening the file with extensions .custom, it should open in Chrome and the content script should load. How to implement this? I have added the code below, ...
1 vote
1 answer
126 views
EventTarget doesn't work in Firefox content script, does work in Chrome
In Chrome extension content scripts it is fine to do: const myTarget = new EventTarget() myTarget.addEventListener('test', () => console.log('test1')) myTarget.dispatchEvent(new Event('test')) but ...
1 vote
0 answers
16 views
Accessing and overwriting builtin variables or classes within a webpage using a firefox addon's content script (Or alternative method?) [duplicate]
I wrote a userscript a while back for a specific webpage and I want to make a more polished tool using a web extension. The general idea is, Im intercepting a webpage's builtin Class, and rewriting ...
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
0 answers
256 views
Chrome extension automatically click a button when it appears?
I am trying to click automatically a "don't logout button" when it appears. I managed to click it manually with a popup in the chrome-extension. But it would be nice if the button will be ...
1 vote
1 answer
86 views
What kind of objects are shared between different worlds in Javascript?
The objects I defined in page script seem not accessible in content script for an extension. But the two scripts do share some variables such as window, document, etc. Is there a way to expose some ...
0 votes
1 answer
233 views
chrome.runtime.onMessage.addListener() getting triggered multiple times
The chrome.runtime.onMessage.addListener() function is being invoked once for the first message received, but subsequently, it's being invoked multiple times, increasing with each subsequent message. ...