2,080 questions
1
vote
1
answer
142
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:...
1
vote
1
answer
72
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 ...
2
votes
1
answer
62
views
Firefox add-on: Open new tab by clicking on custom menu item
I have made a Firefox add on with the following code in background.js
browser.menus.create({
id: "q-menu-item",
title: "'%s' redirect",
contexts: ["selection"]...
1
vote
1
answer
145
views
How can I upload an image to a site with a userscript/extension?
I want to make a userscript/extension that creates a post for you on twitter or reddit.
Unfortunately the browser does not have access to the "choose files" popup, or to the users clipboard, ...
1
vote
1
answer
418
views
How to use Selenium to install Firefox browser add-on?
I would like to use Selenium to install an add-on to my Firefox browser. Specifically, I have an add-on called "nopecha" that I would like to install.
Could you kindly guide me on how to ...
1
vote
0
answers
494
views
How to write/create a local text file inside of a firefox profile through a firefox extension?
I need to be able to create and write to a text file inside of the Firefox profile folder repeatedly (a couple times a minute). It is being done through the background script of an extension and it ...
1
vote
1
answer
222
views
how do I detect if the tab has changed or refreshed in a firefox addon
help!!
this is what i have in my javascript file and i am not sure why it is not working. i am trying to set a background image on refresh and tab change. the changing of the background seems to work ...
6
votes
2
answers
3k
views
How to reuse a javascript function between content script and service worker in MV2/MV3-compatible way?
In Chrome extension, I have a javascript function that I need to reuse both from content script and from background worker JS files.
How can I organize scripts for that?
So far I only managed to ...
0
votes
1
answer
790
views
Firefox extension proxy
I am trying to create a Firefox extension to block search terms on school computers. I'd like to prohibit a list of keywords, but the blocking doesn't seem to be working.
I found an example through a ...
1
vote
1
answer
255
views
Why doesn't the content script open a new window using the windows.create method of the JavaScript APIs for WebExtensions to develop Firefox add-ons?
I'm learning add-ons (browser extensions) development for Mozilla Firefox. I want to create an add-on that lets the user open a new Firefox window containing multiple tabs when he/she presses a ...
0
votes
1
answer
350
views
Firefox extension share async function with return gives => Error: Permission denied to access property "then"
i'm trying to call an async function defined in my extension from a webpage and print the returned value of this function, but i get "Error: Permission denied to access property "then"&...
1
vote
1
answer
210
views
how set badge text after loaded site on my extensions firefox
I am trying to create an extension so that I can display the number of hidden input tags (<input type="hidden">) as a badge text in Firefox (like the image ==> )
But I have two ...
0
votes
1
answer
162
views
Rerun Firefox addon's script on URL dynamic change
To simplify the scenario, lets say I'm working on an extension that just contains: alert("Hello") whenever you load a page in example.com. Relevant manifest.json part:
"content_scripts&...
0
votes
1
answer
153
views
How to sleep in a firefox extension (old and native JS methods not working)?
I tried
let { setTimeout } = require('sdk/timers');
browser.webNavigation.onCompleted.addListener(setTimeout(resetSpeed, 3000));
browser.webNavigation.onHistoryStateUpdated.addListener(setTimeout(...
0
votes
0
answers
49
views
insert content from firefox webextension
I created a simple Firefox extension to show an external page in a popup. I was now wondering if it's possible to use the content from the external page to fill a field in the current tab or if this ...