Questions tagged [firefox-addon]
Commonly, you should use this tag IN ADDITION TO the tag for the specific type of add-on which you are asking about. At this point, the most common is firefox-addon-webextensions for WebExtensions based add-ons. A Firefox add-on is a way of adding to or modifying the Firefox web browser. Most commonly, questions in this tag are about Firefox extensions, which add new functionality to the browser, although "add-on" may also refer to themes or plugins.
firefox-addon
7,454
questions
1
vote
0
answers
30
views
JavaScript: openpgp is not defined error in Firefox extension content script
Original Question:
Problem Description
I am developing a browser extension that uses OpenPGP.js to encrypt and decrypt selected text on a webpage. The extension works perfectly in Chrome, but I ...
0
votes
0
answers
15
views
Override Variable or Event handler in Browser app through an Extension
My company uses a 3rd party service that is built with React.
There are some text field parts of the app that my company requires to be formatted a certain way. For various reasons we are not in a ...
0
votes
0
answers
42
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 ...
0
votes
0
answers
30
views
Why does my Firefox extension not trigger a keyboard shortcut?
I'm using a Firefox CSS theme that basically removed the picture-in-picture option when watching videos. On this website I'm watching videos in, I would like to have the option again via an extension. ...
0
votes
0
answers
22
views
Why `chrome.tabs.query(...)` is undefined in firefox?
Running the following code on the popup page of the firefox addon reports the error Uncaught TypeError: chrome.tabs.query(...) is undefined
chrome.tabs.query({ active: true, currentWindow: true })....
0
votes
0
answers
36
views
A Firefox extension to open custom image file by dropping on it
Windows 10
Firefox 128.0
I'm trying to create a Firefox extension that handles custom file format (XPX) drop on Firefox.
The file is zlib compressed binary data. As per the extension guide here are ...
0
votes
0
answers
31
views
How to execute simple script like auto scroll on local file
When I put code on console (F12) on normal page this code works, normally has https:// address. But when it comes to local file or when i open pdf on browser, the F12 code doent work, but when you ...
1
vote
0
answers
9
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
42
views
Does CSS injected by "user style" browser extensions necessarily have the "user style" CSS origin? Is there a way to find out programmatically? [closed]
I'm trying to understand the mechanics of how user-style browser extensions (like Stylus) inject their CSS. According to my understanding, stylesheets with a 'user style' CSS origin have a priority ...
1
vote
0
answers
29
views
Is it possible to clear web browser "offline website data" programmatically (extension development)?
As known, "Offline Website Data" can be cleared as follows from the browser:
I tried to do that but there is no option to clear the "offline website data":
browser.browsingData....
1
vote
0
answers
54
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
21
views
How to not download the binary when we reach an URL that finish by .exe
I want to be able to check the content of binary file before downloading it on a browser when I reach a .exe file with a URL (something like www.example.com/test.exe)
I did not find anything to do it, ...
1
vote
0
answers
9
views
background script not getting executed in firefox extension but gets detected when temporarily load extension
I have written this manifest.json
{
"manifest_version": 2,
"name": "Get tab url and title",
"description": "Copies the Title and URL of the currently ...
1
vote
0
answers
30
views
Is there any way to get setPointerCapture to work with artificial pointer events?
I'm working on a browser extension that creates artificial pointer events and sends them into the page using dispatchEvent like so:
function myCreatePointerEvent(pointerId, isPrimary, screenX, screenY,...
2
votes
1
answer
40
views
Firefox `browser.identity.getRedirectURL()` uses random id instead of extension ID in URL
browser.identity.getRedirectURL() returns https://3347c8cebdf365b6de12af5ab0927a76cf6421c3.extensions.allizom.org/ even though in manifest.json browser_specific_settings.gecko.id is set to contexto-...