Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
18 views

How can I make a provider script for an extension to connect it with Web Apps?

I have created an unpacked extension that is working fine I want it to be injected and be able to connect it with apps like MetaMask wallet does. I have created a provider.js script to do it. I want ...
artistAhmed's user avatar
3 votes
1 answer
119 views

What is a restricted JavaScript object?

I'm trying to use custom DOM events to communicate between the main world and the isolated world for a page in a webextension in Firefox. When trying to access an event object property, I get an ...
Nanigashi's user avatar
  • 182
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
0 votes
0 answers
30 views

Warn users of missing optional permissions in Chrome/Firefox extension

Consider a Chrome extension that dynamically injects content scripts. It specifies "optional_host_permissions": ["<all_urls>"] in the manifest (v3). It only needs the host ...
xuhdev's user avatar
  • 9,222
0 votes
0 answers
43 views

import method to other file without ES6 in firefox extension

I develop web extensions for the browser. I have a js file code from which is designed to create a specific ui on the site page, the problem here is that I do not want to duplicate this code in 2 ...
user avatar
0 votes
0 answers
19 views

Firefox extension access to all localStorage similar to all cookies

It's possible to get all cookies (e.g., in the extension background) that the browser has stored using code like browser.cookies.getAll( { firstPartyDomain: null, partitionKey: {}, storeId: ...
Nanigashi's user avatar
  • 182
0 votes
1 answer
68 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 ...
banks's user avatar
  • 13
0 votes
0 answers
25 views

Getting "Uncaught (In promise) TypeError" when porting my Manifest v2 Chromium/Chrome Extension to Manifest v3

I am currently in the process of porting my manifest v2 Chrome/Chromium extension to manifest v3 and while I got the structure changed to support manifest v3, I keep getting this error when modifying ...
Michael Gunter's user avatar
0 votes
0 answers
23 views

request to a server from an extension - refresh page after receiving response from server in a browser extension

Maybe I'm missing something, since I'm new to using browser extensions. From an extension a request is made to a proxy, the proxy obtains the response from the final server that responds with the ...
palomino's user avatar
1 vote
2 answers
63 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:/...
Drifter64's user avatar
  • 1,123
0 votes
1 answer
58 views

Show custom HTML in Firefox add-on popup/dialog

I'm learning how to make an extension (for Firefox). This add-on reads the youtube main page (https://www.youtube.com/) and get the visible videos on it. From those videos, I'm able to extract the ...
Mauricio Arias Olave's user avatar
1 vote
1 answer
74 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 ...
Sukhmeet Singh's user avatar
0 votes
1 answer
87 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 ...
shadryck's user avatar
  • 301
0 votes
1 answer
97 views

How to align badge text to left/right in a browser extension

I'm working on a browser extension called Stack Me First where I add slightly longer badge text. But the first few letters of the text are important to be visible. Currently the badge text is aligned ...
Gangula's user avatar
  • 7,104
1 vote
0 answers
79 views

How do I detect if the user goes back or forward through the history in the current tab?

I'm going to implement a simple web extension for my personal needs (currently for Chrome, but I consider moving to Firefox and abandon the former), and this extension only requires the history and ...
terrorrussia-keeps-killing's user avatar
2 votes
0 answers
90 views

navigator.storage.getDirectory empty when called from browser.tabs.executeScript?

I'm trying to create a Dev Tools panel to inspect the origin private file system, as it's apparently missing from the Storage panel in the latest version (115) of Firefox LTS. However, when using ...
JamesTheAwesomeDude's user avatar
1 vote
1 answer
57 views

how to make Webextension content_scripts load on opened pages after the first?

Problem: The content_scripts specified in the manifest.json of a WebExtension are only applied to the first page loaded in a window created by the extension regardless of how non-specific my matches ...
masukomi's user avatar
  • 10.9k
3 votes
1 answer
47 views

Why cookies can not be returned?

I have the following firefox extension. I want to get cookies from the browser. But when I click "All" in the extension, the console.log(await (browser.cookies.getAll({})) only print an ...
user1424739's user avatar
  • 13.5k
1 vote
0 answers
40 views

How to access JSON that another script requested?

If you use your browser's devtools you can easily see the JSON as a response to an XHR request in the Networking tab. How to access the same JSON in your own Javascript, e.g. from the context of an ...
ALT's user avatar
  • 23
1 vote
0 answers
72 views

Adjusting Mozilla extension: page action task for a target page

I'm trying to adjust simple Firefox extension: page_action for a particular page: when the user clicks the page action icon on that page, it should navigate to https://target-web-page.asp (i.e. action ...
Lexx Luxx's user avatar
  • 264
1 vote
1 answer
221 views

I am almost finished porting a Chrome/Chromium Manifest v2 extension to Manifest v3 and while I no longer get errors, no audio plays. What to do?

I have been working on porting this manifest v2 Chrome extension to manifest V3 and while I did port the extension through changing the structure in the manifest file and replacing the background.js ...
Michael Gunter's user avatar
1 vote
0 answers
105 views

How to use runtime.sendMessage from background to a content script?

I'm trying to use browser.runtime.sendMessage from background.js to a content script, but I keep having the error: Uncaught (in promise) Error: Could not establish connection. Receiving end does not ...
Jonas's user avatar
  • 113
1 vote
0 answers
29 views

Cannot load two temporary extensions at the same time in Firefox?

I load a temporary extension(with a content script) in Firefox by "about:debugging#/runtime/this-firefox" and this extension works fine. Then I load another temporary extension(with a ...
William's user avatar
  • 979
1 vote
0 answers
33 views

Firefox extension: Want to remove all cookies of activeTab if certain domain is loaded

I am kinda struggling with porting a private chrome extension to firefox. My goal is the following: After a page is loaded, I want to delete all cookies from certain domains (which are stored in a ...
user162984's user avatar
1 vote
1 answer
32 views

Why events cannot be used inside of a WebExtension

PreReq.: Firefox (latest) WebExtension V2 / V3 (the version doesn't matter) I have several content scripts in a WebExtension, all organized in classes. Assume I have two classes connected by the ...
codekandis's user avatar
0 votes
0 answers
77 views

How to send data from Chrome extension's background script to a React app without using query params?

I have some data that I gather on the extensions background script. Then I create a new tab and open my React app hosted locally on localhost:4200 (for now). And I tried sending the data in the URL as ...
seebham's user avatar
  • 81
2 votes
0 answers
346 views

Extension on Firefox running with only on clicked

I have a dark mode extension that injects a CSS file into a website. It works fine for all other browsers (Edge, Chrome, Opera, etc) except for Firefox where the user has to manually select the ...
Ryan Luu's user avatar
  • 601
1 vote
0 answers
43 views

WebRequest Header Modification on other extensions

I am currently trying to write a compatibility extension for raindrop.io. Some hosts I am working with a lot require some additional fields added to the header, otherwise they reject the request. ...
Flying Lizard's user avatar
1 vote
1 answer
171 views

Why can I not load a simple custom firefox extension/addon xpi file? Tried everything

I'm trying to load a simple xpi file I created from this walkthrough below using Android Firefox Nightly. Things I've done so far Tried different compression methods to make the zip/xpi Set xpinstall....
Mr J's user avatar
  • 2,955
1 vote
0 answers
62 views

Firefox extension background script terminated preemptively

I have a Firefox extension that for certain pages listens to the webRequest.onHeadersReceived for specific URLs that it opens in order to remove the "content-disposition" header when it ...
Xerillio's user avatar
  • 5,221
1 vote
2 answers
65 views

I'm building addon for firefox user can take screenshot, but browser.runtime.sendMessage returns undefined

I'm trying to implement a function that user can take screenshot using browser.tabs.captureVisibleTab . But browser.runtime.sendMessage immediately returns undefined. In console.log("dataUrl ::: &...
user23512465's user avatar
2 votes
1 answer
420 views

My service worker is not connecting to my content script in my Chrome extension. How do I fix this?

I have been working on porting this manifest v2 Chrome extension to manifest V3 and while I did port the extension through changing the structure in the manifest file and replacing the background.js ...
Michael Gunter's user avatar
2 votes
1 answer
157 views

How do I fix the following issues with my port of a manifest v2 browser extension to manifest v3?

I am in the process of transitioning a manifest v2 Chrome extension to manifest v3 and while converting my background script background.js to a service worker, and I am getting error messages in ...
Michael Gunter's user avatar
1 vote
1 answer
114 views

Changing src image with Firefox extension

I'm creating my first browser extension - and this is for Firefox (testing in Firefox Dev v120), ive included an image in 'images' directory of the extension, i have "web_accessible_resources&...
BlissSol's user avatar
  • 418
1 vote
1 answer
722 views

How to open a deeplink without creating a new tab or window in a web extension

I have an anchor tag which when selected should open a link to an external application (Obsidian). Here's an example link: obsidian://action?param1=value&param2=value. I expect that clicking on ...
ALegendsTale's user avatar
1 vote
0 answers
19 views

firefox extension, read background script variable from popup? [duplicate]

I have a firefox extension: background_script.js: const textVar = "some text" browser.menus.create({ id: "selection-to-tg", title: "send selection", type: "...
bitbar's user avatar
  • 301
1 vote
1 answer
94 views

WebExtensions : Can you access a JSON object that was fetched by the webpage

Is there a way after a webpage has loaded to access a JSON object that was fetched by the webpage? I am aware that I could use the webRequest api to get the url of the JSON resource and fetch it again ...
bangers-and-mash's user avatar
0 votes
0 answers
7 views

browser.declarativeNetRequest property is undefined despite processing static DNR redirects [duplicate]

I am attempting to add dynamic DNR redirects to a MV3 web extension running in Firefox 123. When the script in charge of adding dynamic redirects runs, it throws the error TypeError: can't access ...
dragongirl's user avatar
0 votes
0 answers
53 views

Access Chrome APIs in a web application built with ReactJS

I am creating a web application in ReactJS, and I want to access Chrome APIs such as chrome.proxy, chrome.management, and chrome.tabs in my web application. function App() { const onProxyConnect = ()...
Ahmed Faraz's user avatar
1 vote
0 answers
139 views

WebExtension does not start content script on Android (geckoview)

In a geckoview based app I need to display various errors in the browser window. Some of the buttons offered there have to be evaluated and processed further in the app. I have tried various scenarios ...
user23318917's user avatar
1 vote
0 answers
154 views

webRequest API not working with manifest v3 extension

I'm trying to migrate an extension which uses the webRequest API from manifest v2 to v3 for both Firefox and Chrome. While it works as expected in Chrome, I can't get the webRequest API to work in ...
Picard's user avatar
  • 1,037
1 vote
0 answers
146 views

browser.webRequest.onBeforeRequest is not being triggered in my firefox extension

I am trying to intercept http request made using fetch / XmlHttpRequest in my firefox extension following the example here, but nothing is logged in debugger console. //manifest.json { "...
hrishix6's user avatar
1 vote
0 answers
92 views

How to query the URL of the currently active tab in a background script

I have recently started writing a privacy extension that requires me to create a list of active domains to run a background task for each. I'm new to writing browser extensions, but my idea was to ...
siery's user avatar
  • 547
1 vote
0 answers
233 views

Get response data from intercepted http request [duplicate]

I'm using Firefox, and creating a personal web extension. I'm trying to get the data returned by GET requests sent out by a website. I can successfully intercept the requests using the background ...
aceynk's user avatar
  • 11
1 vote
1 answer
31 views

div movement being choppy on firefox extension

I'm building a firefox extension that outputs a movable div that is controlled by the keyboard but when I try moving down or left (your left when looking at your screen) it doesn't move until I try ...
Emac342007's user avatar
1 vote
0 answers
55 views

Python programme executes all lines but does not run any 'subprocess.Popen()' lines

I have simple Firefox add-on that, I am using it to test and discover the capabilities of Native Messaging, something I recently came across. The add-on side of things works as I expect it, nothing ...
Ralf_Reddings's user avatar
1 vote
1 answer
182 views

Messaging content script works when using 'webRequest.onBeforeRequest()' as the trigger but not when using 'webRequest.onCompleted()'

I finished writting my first extension and it works as I programmed it, but after completing it, I realised I made a mistake in its design, currently its designed to alert me before a event occurs (...
Ralf_Reddings's user avatar
0 votes
0 answers
38 views

Firefox web extension takes a split second to load [duplicate]

I am working on a Mozilla Firefox web extension. My manifest.json: "manifest_version": 2, ... "content_scripts": [ { "matches": ["<specific_web_url>...
Targetbus12's user avatar
1 vote
0 answers
102 views

Creating a tab from inside a devtools extension returns successfully with a tab id of -1

I'm working on a devtools extension. Inside the JS code of a devtools panel I'm trying to create a tab; the tabs.create function returns successfully but the new tab id is -1 and, of course, no new ...
Koas's user avatar
  • 420
1 vote
1 answer
45 views

Firefox Web-Extension with Javascript doesn't execute

I wrote a quite simple FFox Extension which works on my Office-PC (win10) but does not on my Home PC (win11). Same for my colleague. The extension calls a javascript which logs every step in the ...
c_ph_r's user avatar
  • 267

1
2 3 4 5
32