Questions tagged [web-extension]

Web Extension is API for major browser extension(plugin) development. Use this tag together with browser specific tags google-chrome-extension firefox-addon-webextensions safari-web-extension when you target all browsers and care for compatibility.

Browser Web Extension becomes standard for browser extension/plugin/addon development. Originally developed in Chrome, it was later adopted by Firefox and Edge, and in 2021 by Safari.

However as of 2021 there is no vendor neutral spec, and every browser has its own documentation. W3C WebExtensions Community Group (WECG) https://github.com/w3c/webextensions/ is ongoing effort for standardization.

87 questions
6
votes
3 answers

Run my JavaScript code on every page on my browser, similar to how a Chrome extension would

I know with Chrome I can use snippets to manually run some JavaScript code on a webpage. But this required manually executing the snippet. Is there a way to have some JavaScript code that my browser (Chrome or Firefox) would load every time I visit…
4
votes
2 answers

Uncaught TypeError: Failed to construct 'URL': Invalid URL in chrome extension v3 when using messages

Here is a minimal extension for chrome in v3: manifest.json { "manifest_version": 3, "name": "Test", "version": "1.0", "description": "Test extension", "icons": { "48": "dark.png" }, "background": { "service_worker":…
3
votes
0 answers

Getting package is invalid `crx_required_proof_missing` when installing my own, signed extension

I'm building an internal extension for my company. Since it's an internal tool, I don't want to publish it on the Chrome Web Store. To be able to self-host the browser extension, I'm doing the following steps: (before): I created a .pem to sign the…
2
votes
0 answers

Google Analytics in a web extension makes MS Edge unresponsive

I'm working on a web extension and trying to implement Google Anaytics 4 into the extension (not GTM). I was able to successfully implement this functionality and tested it in Firefox successfully. But when I load the plugin in MS Edge after this,…
Gangula
  • 5,193
  • 4
  • 30
  • 59
2
votes
0 answers

Service_worker error occurs when using the Safari extension to process saving settings

First of all, please note that I am not fluent in English, so I am using machine translation. Summary I have created a Safari extension with Manifest v3. However, when I perform the following specific actions, I get the error "The service worker…
2
votes
1 answer

Using `window` globals in ManifestV3 service worker background script

I'm working on a Manifest v3 browser extension where I need to identify the browser in which the extension is currently running from the backgroundScript. Since ManifestV3 extension uses a service worker, it doesn't have DOM or window. So I'm not…
2
votes
1 answer

Cypress: how to test webextension apis in cypress

We have our extension installed on chrome browser which is launched by cypress. As url in the browser is one as per the list of integration tests(highlighted in red), unable to simulate webExtension apis like browser.tab.onUpdate or…
2
votes
1 answer

Can I send message directly from Safari Web Extension’s background page to Native App?

I am developing a safari web extension. I need send data from Web Extension’s background page to native app. Native app gets this message and signs it with USB key to generate a signature value. Then Native app sends the signature value back to…
John
  • 41
  • 5
2
votes
1 answer

Web Extension (browser plugin) for Chrome, Firefox, Safari standard reference and tools (2021)

As far as I remember correct name for browser plugins we are using today are actually called "Web Extension". Before every browser had its own APIs, then Chrome and Firefox agreed, and now Safari (v14 with macOS 11 in 2021)…
1
vote
0 answers

Is it possible to do modern style clean routes on a Chrome extension?

I have a Chrome extension / web extension that occasionally opens content in new tabs. For example, opening the URL extension://lijpcppdcclkfneghlldocanomgeabja/index.html in a new tab, opens the index.html which is a file inside my extension. Is…
1
vote
0 answers

PerformanceNavigationTiming returns wrong values

I am using the PerformanceObserver API in a web extension to get the PerformanceNavigationTiming. this.performanceObserver.observe({ type: "navigation", buffered: true }) I have several users that installed my extensions and globally I have good…
Andrea11
  • 13
  • 3
1
vote
0 answers

How to capture event of clicking on a bookmark

I am writing an add-on that stores some information using storage.local when a bookmark is created. I would like to use that stored info when users click on the bookmark to decide how to open the url of the bookmark. However, after searching…
Wizard
  • 2,961
  • 2
  • 13
  • 22
1
vote
1 answer

Creating a web extension tracking time on website

I am relative newbie with web extensions. My idea is that I want to create a web extension that inputs an integer through a popup when the user enters an entertaining website. When this limit runs out, I want to block the site for a given time…
1
vote
1 answer

How to store user data in firefox web extension

I want to store data (increasing everytime the extension is "triggered") in a json file to display it for the user. I can't find a solution on how to add a json file where I can store and overwrite data.
1
vote
1 answer

Web Extension - chrome.runtime.sendMessage not working in incognito tabs

I am developing a web extension with a custom devtools panel that injects a content script via the scripting API. The content script then sends a message via chrome.runtime.sendMessage, which the devtools panel is listening to. Here is a minimal…
1
2 3 4 5 6