Questions tagged [firefox-addon-webextensions]

WebExtensions are a way to write Firefox extensions that are compatible with other browsers such as Google Chrome and Opera. Microsoft plans to bring support to their Edge browser soon. Questions requiring a MCVE (i.e. debugging questions) should include your manifest.json file in addition to all other files needed to duplicate the problem.

WebExtensions are a new way to write Firefox extensions. It is available in all current versions of Firefox (version 48.0+).

The WebExtensions API is designed for cross-browser compatibility. To a large extent, the API is compatible with the extension API supported by Google Chrome and Opera, with Microsoft Edge following soon.

The documentation for Firefox WebExtensions can be found at MDN :: Add-ons - WebExtensions.

The WebExtensions API is under active development. What is supported improves in each newer version of Firefox. You should pay attention to the Browser Compatibility section on the API documentation page for any part of the API you are using to verify the portions of the API you are using are supported in the version of Firefox you are using. You may want to strongly consider testing your extension with either Firefox Developer Edition, or Firefox Nightly.

Minimal, Complete, and Verifiable Examples will almost always need a manifest.json file in order to be complete, in addition to any other files needed. The manifest.json file contains key information which is necessary in many situations to determine why an extension is not working.

For more information on Firefox Add-on types see the full documentation on Mozilla Developer Network: Add-ons.

1541 questions
0
votes
1 answer

Can Firefox add-ons run for non-HTML requests such as images?

I am following the instructions on developing a WebExtension for Firefox. I have it working for HTML pages. But, I would also like my script to run when the requested "page" is an image. Is this possible? Here is what I have: manifest.json: { …
anon
  • 4,578
  • 3
  • 35
  • 54
0
votes
1 answer

Intercepting all API calls with browser addon

I was wondering if it is somehow possible to intercept all JavaScript API calls of a website using a browser extension. The background is that I would like to log what APIs some websites use and even block access to certain APIs or simply provide…
0
votes
2 answers

Open the about:addons page with my plugin's options page on screen

In Firefox, is there a way to open the add-on's own options page within about:addons through a button in the add-on? (Not just the options.html page by itself, but within the about:addons page, the same one that you can get to when pressing "more"…
0
votes
1 answer

Is there a way to implement the search provider override in a Firefox Web Extension?

I'm trying to migrate some Chrome extensions to Firefox. One of them uses the following code in the manifest.json file for chrome: "chrome_settings_overrides" : { "search_provider" : { "alternate_urls" : [], "encoding" :…
0
votes
1 answer

Reload installed Firefox WebExtensions' background script for debugging?

I know: For a content script, I just need to reload the web page, and the content scripts will be reloaded For add-ons loaded as a temporary add-on, there is a Reload button in about:debugging: a click on the button will cause the background…
zhm
  • 3,513
  • 3
  • 34
  • 55
0
votes
0 answers

Working Chrome extension ported to Firefox shown as 'corrupted' in Firefox

I developed an extension for Chrome which I would like to port to Firefox. I followed Mozilla's guide for porting a Chrome extension to Firefox. The extension worked fine when tested locally in Firefox. But, after submitting it to AMO, installing it…
sjy_0831
  • 29
  • 4
0
votes
1 answer

Desktop application using Firefox WebExtensions

I am working on a XUL desktop application, where I use the browser tag and load a URL in that tag within the desktop application. However, some websites display as old format and according to Mozilla, XUL is deprecated and will not be useable at the…
Tariq
  • 218
  • 2
  • 13
0
votes
1 answer

Unobtrusive notification

Is it possible to create a notification like redirection alert in firefox in a webextension? This notification appears on top of the page.
Sanpi
  • 420
  • 7
  • 18
0
votes
0 answers

Bookmarks access with firefox webextentions

I discover the development of webextensions for firefox To start, I would like to access my bookmarks. Step by step I build my Webextensions , using (about:debugging/ "load temporary add-on") I try, for testing, to access to Recent bookmarks . I…
0
votes
1 answer

tabs.query case insensitive title

I'm trying to use browser.tabs.query in my WebExtension. It doesn't work in the case where the tab title does not match exactly. What's more confusing is that docs say this about the parameter for title: string. Match page titles against a…
0
votes
1 answer

Highlighting elements by adding a border and changing ancestor's display style changes the page layout

I am developing a Firefox add-on. I need to highlight elements in a webpage using the element's XPath. I am able to highlight it. The problem is the elements are appearing in a distorted way. They are loosing their alignment. Please concentrate on…
0
votes
0 answers

Get IIS server's time from Response Headers

Using Chrome or Firefox extension I want to best guess this remote server's time. Here is the dump of one response header in background script chrome.webRequest.onHeadersReceived.addListener: I got this stats today at around 12:30 pm IST or 7:00…
0
votes
1 answer

WebExtensions: How to send a message to content script? (Android)

I just noticed that the tabs API is only available for the desktop not for Android. In the past I have used this code to send messages to my content scripts: sendMsgToTabs(msg) { return browser.tabs.query({}).then(tabs => { let…
0
votes
1 answer

Save and restore webextensions options page

I am new to programming and i am building a simple add-on for firefox but i am using web extensions, my options page has a few check box's I need to save the values of these checkbox's and then restore them, Sample code is appreciated. function…
0
votes
1 answer

How can I install WebExtensions for personal use most easily?

I created a few WebExtensions for Firefox that are for personal use. However, now that I want to start using them I find that there is a fairly cumbersome signing process. Because these plugins are for my own use only, and will not leave my…