7,444 questions
1
vote
1
answer
246
views
React Router With Browser Extension Popup Window?
I'm trying to incorporate React Router into my Firefox browser extension to be able to display different pages in the extension's popup window. However, I keep getting the warning, You should call ...
0
votes
0
answers
46
views
Can modern Firefox addons/extensions edit user preferences (i.e. about:config properties)?
I keep toggling the preference full-screen-api.ignore-widgets via the Configuration Editor (i.e. about:config) and I'm wondering if Firefox would allow an extension to perform that change ...
0
votes
0
answers
75
views
browser.runtime.sendNativeMessage → An unexpected error occurred
To implement browser bookmark integration I’m trying to use Firefox native messaging on macOS. Even a trivial shell script that just writes to /tmp/test.log is never executed. Firefox just fails ...
0
votes
1
answer
207
views
How to not trigger Firefox's strict Content Security Policy by my extension
I am currently contributing on an extension, and the main problem is that on Firefox, the CSP is being triggered, which causes quite a few issues. Mainly it seems to block the injection of dynamic CSS,...
0
votes
1
answer
157
views
Install modified XPI on Firefox or Fennec while disconnected from the internet [closed]
I want to download an XPI extension, and then add a console.log('hello, XPI world'); to one of its JS files. My browser is Fennec installed from F-Droid on Android.
I am looking for an equivalent to ...
0
votes
1
answer
118
views
Getting around X-Frame-Options DENY in a Chrome extension? (2)
I have an iframe loading inside an extension page but unfortunately the document inside the iframe embeds its own iframes whose Content-Security-Policy I still can't circumvent with ...
1
vote
1
answer
119
views
Plasmo Firefox production build: Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist
With plasmo 0.90.5, I faced this issue when trying to run my Firefox extension that I built with manifest v3. This issue happens when I try to pass a message to the content script.
Uncaught (in ...
3
votes
1
answer
122
views
Is it possible to modify the body of an outgoing HTTP request in a Firefox add-on?
I am making a Firefox add-on and I need it to have the ability to modify the bodies of certain outgoing HTTP requests. The instructions for modifying headers are readily available on Mozilla's own ...
0
votes
1
answer
99
views
Unable to open Vue Devtools from Toggle or Select Components in Firefox/Chrome on macOS
Environment:
OS: macOS (e.g., Sonoma or Ventura)
Browsers tested: Firefox (latest), Chrome (latest)
Vue Devtools version: [7.7.7]
Vue version: [e.g., Vue 3.4.21]
Devtools installation method: Browser ...
2
votes
1
answer
64
views
Firefox extension for android mobile permissions error
I am working on an extension for Firefox for Android, but I am running into issues with permissions. I have this piece of code that checks what permissions the extension has.
const bookmarks = await ...
0
votes
0
answers
45
views
Browser extension fails to reliably update favicon on SPA pages despite correct <link rel="icon"> in DOM
I’m developing a browser extension that changes the favicon on a Single Page Application (SPA).. specifically Roblox.com. The extension injects code to replace the existing favicon with a custom SVG ...
2
votes
1
answer
106
views
save to file from firefox extension
I want to pass a single number from Firefox extension to external world, so that another application can get it. The only solution I can think of is to write it to a file in some known location, but I ...
0
votes
1
answer
52
views
How to handle window is focused or not when extension is opened?
So the thing is I have an extension that tracks users to check the time they spend in each site. I have a particular code to stop all kinds of tracking when the user switches away from chrome onto ...
0
votes
0
answers
60
views
Performance Discrepancy in Image Pixel Comparison Across Browsers Using Canvas
I am using the Canvas NPM library to perform a delta comparison between two images. Both images have the same dimensions (equal width and height). The Method takes two images as base64 string and I am ...
2
votes
1
answer
38
views
How to use `.xpiignore`?
I want to remake Firefox addon "Open With"( https://github.com/darktrojan/openwith ).
I noticed there is a file named .xpiignore but I can't find document( found some repositories which have)...
0
votes
1
answer
73
views
declarativeNetRequest set condition to the extension
I am working on a extension that downloads for the user content. (WebToEpub)
Some websites check the origin header and block the request if it is wrong.
How can i set the condition in the rule so that ...
0
votes
0
answers
83
views
How can I enforce code integrity for a locally installed (unpacked) Chrome extension so it refuses to run if tampered with?
Background
I’m developing a Chrome extension distributed locally in “unpacked” mode, outside of the Chrome Web Store. I need a way to guarantee that if any part of the extension’s code (JS, HTML, CSS, ...
0
votes
0
answers
30
views
How to automate testing of firefox extension using web-ext?
I can run my extension in the local firefox browser using web-ext run and I can make a webdriver test that can open firefox and automate it, but this version doesn't have the development extension ...
-2
votes
1
answer
97
views
In FireFox's debugger, how do I break at the first line of JavaScript that an addon runs?
In FireFox's debugger, how do I break at the first line of JavaScript that an addon runs?
I need to break at the entry-point, but I don't know what the entry-point is.
1
vote
1
answer
70
views
Web extension: message response is undefined [duplicate]
Edit: I gave up and decided to store the data in the storage.local of the popup.
I am sending a message from the popup to the background to fetch some data from storage.local (when I do it from the ...
2
votes
1
answer
146
views
Navigation in Chrome/Firefox extension
I've been working on my extension YTDownloaderNew, and in the ytm-content-script.js, I'm using this code to detect when the user navigates to a YouTube Music playlist:
navigation.addEventListener('...
1
vote
1
answer
96
views
Browser Extension Message Passing not waiting for async response in background script
I'm creating a browser extension where I need to capture a full-page screenshot. The process involves sending message signals between popup and background script and content-script. However, the await ...
0
votes
0
answers
81
views
How to install extension/s using the installer for a Windows (Firefox) web browser
We have a custom Windows web browser forked from Firefox and for convenience to our users, we would like to include some extensions by default. If they need to be approved by the user that is not a ...
0
votes
0
answers
60
views
bundle firefox extension into firefox for Android source codes
I'm building my android browser from Firefox codes at https://firefox-source-docs.mozilla.org/mobile/android/fenix.html. It builds and runs well. Now I have a firefox extension myext.xpi which I want ...
1
vote
1
answer
131
views
ai api for firefox - browser.trial is not defined in firefox 136.0
I'm trying out Firefox's WebExtensions Ai API, and trying to run their example code. However, I'm getting the error Uncaught TypeError: browser.trial is undefined.
Their instructions say:
For Beta ...
3
votes
1
answer
58
views
How to detect the drag & drop action also in blank tabs (newtab)?
I've been trying for hours to run an extension (addon) on Mozilla Firefox Browser that listens for drag&drop even on empty tabs.
If you look at the following code you will notice console.log(...
0
votes
0
answers
78
views
How can I make my website available offline through a Firefox extension?
I have a website that I write code for just to try out new things I learn about in web dev. I also want to get into Firefox extension creation, which I've already somewhat started with.
I know that ...
0
votes
1
answer
42
views
Blank space in Firefox but not in Chrome in injected span
In the context of a web extension, I am injecting a button in a text node. It works on Chrome but on Firefox, I have some weird long blank in the injected span (between the button and the next comma).
...
1
vote
1
answer
139
views
How to see HTTP requests made by content script file, Firefox Addon Extension
I started developing a firefox extension.
In my extension I make requests with fetch.
But the requests don't appear in the Network tab of developer tools.
I am opening the developing from within the ...
1
vote
1
answer
3k
views
How to install xpi files on firefox for android
I am developing a firefox addon that is meant to work on mobile only. To test it I want to download and install the xpi file on firefox for my android tablet.
This question wants me to open the file ...
0
votes
1
answer
97
views
How to import npm packages in content script in an extension?
I'm trying to make a Firefox extension. So far all I have in my content script is
import isEven from 'is-even'
and I get back SyntaxError: import declarations may only appear at top level of a module....
1
vote
1
answer
129
views
"Uncaught TypeError: browser.browserAction is undefined"
Trying to create a webextension, following the example from firefox bookmark-it!. I'm developing on 132.0.2 (64-bit).
I think I have copied it almost word by word, but i get on my background.js script:...
0
votes
1
answer
84
views
Creating zip file from image blobs on a content script of firefox extension
I'm developing a browser extension that works on Firefox and Chrome, one of its features is to download a zip file with images (webp or png) and I'm using JSZip to create the zip file, but it does not ...
1
vote
1
answer
74
views
browser extension modifying site's javascript
I want to make a simple browser extension that would do the following:
Replace hjkl vim keys with jkl; at compiler explorer's vim-mode.
I figured out that I can open devtools, put a breakpoint ...
0
votes
0
answers
82
views
Use local and sync storages in chrome/firefox browser extension
Is it possible to use a mix of local and sync storages on a Chrome browser extension/add-on?
Local will store a large set of data but sync will be a smaller subset that can be synced across multiple ...
1
vote
1
answer
146
views
Chrome Extension: Run custom JS with access to window before any other JS in webpage [duplicate]
I'm writing Chrome extension (manifest v3), the main aim is to override some of the Window native functions and replace them before any other webpages scripts can access them.
I have contentscript.js ...
2
votes
1
answer
96
views
Unable to get cookies at http://127.0.0.1:3000/ in firefox extension
I don't get any cookies from my ruby on rails development site on firefox with my extension. I already added the extension's id to my CORS policy.
main.js
browser.cookies.getAll({ url: "http://...
-1
votes
1
answer
65
views
Uncaught ReferenceError when connecting firebase real time database with firefox extension
I want to create a firefox extension that connect to firebase but no luck every time i add import to the backgroud.js script i get this error:
Uncaught ReferenceError: firebase is not defined or ...
1
vote
1
answer
70
views
Can a Firefox extension read variables in the distribution/install folder?
We want to verify that only our devices can use our extension, therefore devices need to give an ID and be put on our allowed list.
Similar questions have been asked before, and the answer boils down ...
1
vote
1
answer
418
views
Content security policy blocking injecting browser extension styles into pages in firefox
I am working on an extension that will inject some elements into the webpages using content scripts.
i used react/webpack to build the extension. but when i am trying to use the extension, in some ...
2
votes
0
answers
271
views
Using importScripts() in a service worker in Firefox under Manifest V3
I'm working on a browser extension. In Chrome, I can simply do this:
manifest.json:
"background": {
"service_worker": "scripts/vh_service_worker.js",
},
and in ...
0
votes
0
answers
74
views
Get all bookmark folders in a Firefox extension
What's the fastest way to retrieve all the folders?
This is what I'm trying, but seems to be very slow:
App.get_bookmark_folders = async (title = ``) => {
let folders = []
let nodes = await ...
1
vote
0
answers
52
views
Open browser extension popup with different arguments
In manifest.json I have defined:
"browser_action": {
"default_icon": {
"128": "img/icon128.png"
},
"default_title&...
1
vote
1
answer
68
views
How to modify requestHeaders on browser extentions javascript
I am developing a "basic" extension (addon) in firefox to modify the request headers I followed the official documentation here (copy/paste but didn't work) https://developer.mozilla.org/en-...
0
votes
1
answer
125
views
Firefox Extention onMessage sendResponse
I'm having a pretty frustrating problem with these firefox extensions. Specifically, the problem is that I cannot obtain and then use the data following the sendResponse of onMessage.addListener. Here ...
0
votes
1
answer
72
views
Get multiple response as Promise Array when sending message with chrome.tabs.sendMessage
When all_frames: true is set in manifest.json, the content script runs on all frames of the target page, but when a message is sent to the content script from another script, I would like to know how ...
-2
votes
1
answer
55
views
Browser extensions: How do developers test/live code their JS for a third party website/SPA? [closed]
My question is about browser extensions written with javascript.
Tutorials for writing a browser extension always seem to use some minimal boilerplate HTML/CSS/JS as the test site (index.html = "...
0
votes
1
answer
94
views
How to resend webrequest via a firefox extension?
I am developing a FireFox addon. I want to make that every time a PUT web request with debug_source: "played_threshold_reached" in its JSON request body is sent, the extension sends it with ...
0
votes
2
answers
81
views
First Firefox extension test not going well
I am writing a first test of a firefox extension. I am using the following websites as assistance:
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension
https:/...
1
vote
1
answer
174
views
Obtaining URL of page with basic authentication in Firefox
I have a page which requires Basic Authentication - for example https://authenticationtest.com/HTTPAuth/. What I want is to obtain the URL of this page before the users enter their credentials.
In ...