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
0
votes
1 answer

How to ask for `*://*/*` as optional_permissions addon

I need to ask for *://*/* permission, but I don't know how to do this, because with .permissions.require() doesn't work. Steps I followed: Insert *://*/* as "optional_permissions" in the manifest Use this code to try to ask for permission const…
0
votes
1 answer

Can a Safari web extension change Safari's browser preferences

Is it possible to write a Safari extension that changes the web browsers preference settings? If so where would I find documentation on this? I would like to add a search engine to the list of default ones so if there is already an extension that…
John554
  • 145
  • 1
  • 7
0
votes
0 answers

Why browser.downloads.dowload hits into "undefined is not an object" error for Safari extension?

While trying to port my extension to Safari (using xcrun safari-web-extension-converter) from Firefox add-on, the browser.downloads.download implementation in my extension to download the user options stored hits into following error: TypeError:…
0
votes
0 answers

How to use AJV in Firefox addon?

I would like to use AJV in a Firefox addon in order to validate JSON that has been entered by the user. What file(s) of the AJV repository do I have to include in my project folder and how do I import them correctly? Normally, I'd just use the…
0
votes
1 answer

Is it possible for a webextension/addon to request permission for a specific website at runtime?

I am trying to develop a WebExtension that accesses a user-defined API whose URL I do not know in advance. (More specifically, it manages their Ghost publications, whose APIs would be hosted on the same domains as the publications themselves).…
Hippo
  • 450
  • 8
  • 22
0
votes
1 answer

Create a Safari WebExtension to Toggle a class

I'm new to building web extensions and I'm struggling to do some simple action. All I want is to click a button in the menubar to toggle a class. Seems like most examples I have found are out of date or are Chrome specific? Does someone have any…
kevski
  • 21
  • 5
0
votes
1 answer

Chrome extension options page minimized unless move away from tab

Upon switching to Chrome's Manifest 3 format (and per its requirements, using a service worker if that's somehow relevant), my options page shows up like this: Only upon moving away from the tab and reentering it, do I get my options to show…
Brett Zamir
  • 14,034
  • 6
  • 54
  • 77
0
votes
0 answers

Content Script doesn't run until page reload

Although there are a lot of similar questions here, I couldn't solve my problem with any of the accepted solutions, so I'm creating a new question. I have a content script that adds some functionality to a Jira Issue. However, when navigating to the…
0
votes
1 answer

Is there a callback for port.postMessage() in WebExtenstions

Is there a way to wait till the receiving party processes message sent using port.postMessage(message)? I'd expect something like callback passed as second argument similarly to chrome.scripting.executeScript(injection, callback)
czerny
  • 15,090
  • 14
  • 68
  • 96
0
votes
1 answer

iOS Safari Web Extension - What happens to current users when we add a new required permission

I'm working on an iOS Safari Web Extension, and I want to add a new required permission. However, I can't find anywhere explaining what happens for the current users. Will the extension continue to work as previously? Will the extension be…
Jorge Costa
  • 249
  • 2
  • 6
0
votes
1 answer

Chrome Extension postMessage from background script to content script every time in change crome tabs

Good day. I have a problem sending messages from background script to content script. I try to send messages every time a user switches between browser tabs. I get this error. Unchecked runtime.lastError: Could not establish connection. Receiving…
-1
votes
1 answer

Why does my IndexedDB save function not work?

I am making an edge web extension game, I've got the game done, so now i have to do storage. I will use IndexedDB because webSQL will no longer be available soon. I made a save function, but i got an error. This is the function that calls the save…
1 2 3 4 5
6