Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
20 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:...
gcb's user avatar
  • 14.7k
1 vote
1 answer
52 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 ...
Thomas's user avatar
  • 385
2 votes
1 answer
39 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"]...
user3425506's user avatar
  • 1,427
1 vote
1 answer
113 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, ...
stackers's user avatar
  • 3,221
1 vote
1 answer
311 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 ...
GoKu xD's user avatar
  • 21
1 vote
0 answers
312 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 ...
MD3728's user avatar
  • 11
1 vote
1 answer
163 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 ...
grady2smart's user avatar
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 ...
wass rubleff's user avatar
0 votes
1 answer
639 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 ...
foo_bar_zing's user avatar
1 vote
1 answer
234 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 ...
Pine Code's user avatar
  • 2,747
0 votes
1 answer
315 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"&...
Rémi Baldy's user avatar
1 vote
1 answer
162 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 ...
Mohammad Nikouei's user avatar
0 votes
1 answer
147 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&...
Cyber Shadow's user avatar
0 votes
1 answer
136 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(...
user96769's user avatar
0 votes
0 answers
45 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 ...
vespino's user avatar
  • 1,930
0 votes
1 answer
159 views

loading simple iframe from extension firefox

I have created a webpage that runs a script that I would like to be able to open from a button on the Firefox taskbar like an extension. If this looks something like this addon layout wise that would ...
vespino's user avatar
  • 1,930
0 votes
1 answer
48 views

Problem with adding functionality to JavaScript Firefox Extension?

Works: chrome.browserAction.onClicked.addListener(function (tabs) { if (allowedAddresses(tabs.url)) { chrome.tabs.sendMessage(tabs.id, { command: "getVideosArray" }, function ( ...
user96769's user avatar
1 vote
1 answer
547 views

browser.tabs.executeScript in Firefox Extension return value

How to return a value in browser.tabs.executeScript in Firefox Extension? I need to access var selectedText. I have tried this but it doesn't work: var test = browser.tabs.executeScript( { code: ` ...
MakiWolf's user avatar
0 votes
1 answer
70 views

Is there a way to download ALL addons for firefox?

For my final year uni project I am scanning firefox addons. I need to download the .xpi for every possible extension, what is the best way to do this? Thanks.
Will Astley's user avatar
0 votes
1 answer
132 views

How to publish extension on Firefox in beta version

I want to publish my extension on Firefox for beta testing team. So someone can express me how to do this. Or any steps to do them, it will be more help for me.
Gaurav's user avatar
  • 93
5 votes
0 answers
313 views

How to directly link to the Firefox Add-On Keyboard Shortcuts page

I am building a WebExtension on Chrome and Firefox which performs task X, Y and Z through a popup (browser_action). I would like to allow users to trigger X, Y and Z through keyboard shortcuts using ...
Rohan B's user avatar
  • 116
1 vote
0 answers
95 views

how to access a firefox plugin from terminal

I am wondering if anyone knows how to access a Firefox extension from the terminal. To search from the terminal, we can use firefox --search "hello world" Can we do that for an installed ...
idwx's user avatar
  • 57
0 votes
1 answer
47 views

Firefox Addon Publishing API

Does Firefox provide access to do the following programmatically? Upload Firefox addon package/files Update/modify addon package Get analytics on extension (installs, uninstalls, etc.) Delete/remove ...
user1531628's user avatar
0 votes
1 answer
439 views

Retrieve TargetElement with targetElementId for Firefox Addon

I am trying to create an add-on for Firefox which enables me to input password from a REST based server to input field. To achieve this, I added context menus with the add-on to Firefox. The ...
reschiram's user avatar
4 votes
4 answers
1k views

Your first extension - official Firefox extension tutorial not working

I wanted to try learning how to make a browser extension and tried doing the first official tutorial https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension ...
BreezeWind's user avatar
1 vote
1 answer
2k views

How to get current page URL with gecko?

I am trying to make my android web browser open only specific urls. Because of that, I want to check if loaded url meets the requirements, and according to that to do something. I saw many answers ...
Andrija Randjelovic's user avatar
1 vote
1 answer
284 views

Running javascript on pinned tabs in firefox

I want to run some javascript on pages opened in pinned tabs in firefox, specifically I want to modify the dom of web pages which are loaded in pinned tabs. How do I do that with firefox addon api?
saga's user avatar
  • 2,113
0 votes
1 answer
1k views

Access current document from Firefox extension browser action background script

I'm building a toolbar button extension for Firefox. In my background script, I need to access the document for the current tab when the toolbar button is clicked. window in this context is the ...
Chris's user avatar
  • 12.2k
0 votes
1 answer
282 views

Cannot type slash or single quote in firefox add-on input field

I'm learning to develop a Firefox add-on. I've made a simple dev-tools tab with an input box. I'm finding that I can type every character into the input box with the exception of "/" or "'". A forward ...
spyderman4g63's user avatar
1 vote
0 answers
104 views

Trick webpage that tab is active with tabs.executeScript

I'm trying to make an addon which harvest some data from inactive tab. The problem is this site somehow detects it's inactive and load data only if user looking at it (tab is active). Of course I can ...
niref's user avatar
  • 55
0 votes
1 answer
79 views

Writing to file without user's confirmation

I'm looking for a way to write to a file from firefox webextension addon like it was possible in old addons. I know it was removed because of security concerns but something like writing to a file ...
niref's user avatar
  • 55
0 votes
0 answers
32 views

How mobile Firefox addon can recieve information from it's Desktop version? (if both are logged in)

I want to be able to close tabs on my mobile Firefox, while using Desktop version of Firefox. I thought Tab-sync would make it work, but it doesn't. So now I'm on the quest to fix it with an extension....
Andrey Ant's user avatar
0 votes
1 answer
775 views

WebExtension: browser.tabs is undefined in FireFox (elementary OS)

I'm trying to get access to the browser.tabs using an extension. My manifest.json currently includes these permissions: "permissions": [ "<all_urls>", "activeTab", "tabs", "storage" ] ...
spekulatius's user avatar
  • 1,489
0 votes
1 answer
96 views

Automatically redirect to another webpage when a website prefix is detected in Firefox

Is there a simple way to redirect a webrowser (Firefox) to another website whenever the actual page starts with a prefix? My case is with IEEEXplore, I'd like to redirect https://ieeexplore.ieee....
noureddine-as's user avatar
0 votes
0 answers
216 views

How to check if extension/add-on used in Mozilla Firefox is a new tab extension?

I can't find out how to check if the extension used in Mozilla Firefox is a new tab extension. It works for Google Chrome. I am using the following code in my Google Chrome extension while using ...
deadcoder0904's user avatar
1 vote
1 answer
706 views

Chrome extension: how to get newly created tab url

In my extension/addon background script I'm having issues trying to a new tab's url, it keeps coming back with 'about:blank', which is fair enough if it hasn't loaded properly yet. My question is how ...
Hank's user avatar
  • 2,616
0 votes
0 answers
163 views

Can a browser extension access a locally-scoped variable in my script?

I noticed that browser extensions have the permission to access localStorage from any webpage (Get localStorage from within extension without loading a page) as well as cookies (Access cookies from ...
nick carraway's user avatar
0 votes
0 answers
106 views

Want to load only JavaScript and HTML in Firefox. Everything else should be blocked. (Save RAM and CPU Usage)

I wrote a program which openes a lot of firefox-instances (up to 20). The sites are full of content and videos, pictures, cryptominers and gifs. I only want to load HTML and JavaScript to save RAM and ...
Matthias Schäfer's user avatar
1 vote
1 answer
1k views

Does Firefox allow extensions to bypass a normal web page's CSP?

I have a web page with a CSP like this: <meta http-equiv="Content-Security-Policy" content="script-src 'self' https://d2wy8f7a9ursnm.cloudfront.net https://cdn.polyfill.io https://browser-update....
jacob's user avatar
  • 2,894
0 votes
2 answers
347 views

How to run firefox in native app of an extension?

I'm trying simple modify an extension example to run firefox,but I get a message prompt : Firefox is already running,but is no responding. To open a new new window, you must firest close the existing ...
illiterate's user avatar
2 votes
1 answer
2k views

Firefox extension. How to access "browser" namespace from console?

I'm trying of the console to access the "browser" environment e.x. browser.cookies.getAll but this not defined anywhere except extension environment. If make simple firefox addon (extension) with one ...
Ruslan's user avatar
  • 23
0 votes
1 answer
438 views

Promise resolve not called because popup closes too fast

I have the following piece of code: browser.windows.create({ url: urls }).then((newWindow) => { newWindow.tabs.slice(0, pins.length).map((tab, index) => { browser.tabs.update(tab.id,...
Adrien's user avatar
  • 2,206
0 votes
1 answer
655 views

How to call function in certain time interval

I need to run a certain API function, in a certain time period once the access token is granted, and check the status and inform the user if there any changes. So far i did it by clicking a button on ...
namila007's user avatar
  • 1,134
0 votes
0 answers
2k views

NS_ERROR_FILE_ACCESS_DENIED error when Firefox Addon is installed the second time

We have the Firefox Addon (the .xpi file) hosted locally. The xpi file is downloaded from the Mozilla Addon developer hub and put on our server. When we install the Addon from the browser, the first ...
Md Rahatur Rahman's user avatar
1 vote
0 answers
63 views

Manipulating the browser chrome in a web extension

I want to develop a small extension to hide the browser chrome for a use case. It seems that the new way to develop addons is to use the web extension api. With the old api it seems to be possible to ...
rekire's user avatar
  • 47.9k
1 vote
0 answers
31 views

Update Single Firebase

After authenticating i'm trying to lookup a user document at /users/, then i'd like to update the document with data from auth object as well some custom user properties. But I'm getting an error that ...
belladaisy2018's user avatar
0 votes
1 answer
80 views

call page function from firefox addon with location.href doesn't work

i try to call a javascript function from the original page from my firefox extension content_script like this: content_scripts.js location.href="javascript:tellParent('lightboxClose();'); void 0"; ...
Fendo's user avatar
  • 21
4 votes
1 answer
2k views

How to use Vue.js in a web extension popup?

I'm trying to develop a web extension and use Vue to style the popup but it doesn't seem to work. The code is extremely basic at the moment manifest.json: { "manifest_version": 2, "name": "Web ...
John Devitt's user avatar
0 votes
0 answers
202 views

Mozilla addons server API: "Duplicate add-on ID found"

I try to write the script that will publish my extension to all stores, done with Chrome but stuck with Firefox. I was guided by this documentation. I am able to upload to Mozilla store through the ...
Vitaly Zdanevich's user avatar
2 votes
1 answer
5k views

Loading unpacked extensions doesn't work Firefox

"This addon could not be installed because it appears to be corrupt" I am getting the above error from installing an unpacked extension. I just unpacked the extension using Winrar and then just ...
Bob Kimani's user avatar
  • 1,164

1
2 3 4 5
42