firefox-addon-sdk

Making a panel persist despite click on page opened in browser

我怕爱的太早我们不能终老 提交于 2019-12-11 02:56:47
问题 I want to achieve this Anchor a panel to a widget make it persist It will only appear or disappear when widget is clicked or It may be made to disappear by clicking some button on it I want to achieve this because my addon is entirely residing in a panel Here is the addon. 回答1: Ok, I looked at this a bit more, and I'd like to apologize for a couple of things: iframe won't work due to cross-domain security issues. That was a dead end. I took waaay too long to get back to you, I've been on

JQuery in Firefox Addon causes multiple warnings

做~自己de王妃 提交于 2019-12-11 02:47:58
问题 I'm using jquery within a firefox addon, but i keep getting tons of warning messages like below: anonymous function does not always return a value System JS : WARNING resource://gre/modules/XPIProvider.jsm -> jar:file:///c:/use rs/usernameremoved/appdata/local/temp/tmprpnucw.mozrunner/extensions/jid1-I3FWz29roUS 8UA@jetpack.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader. js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://jid1-i 3fwz29rous8ua-at

How to develop legacy Firefox add-ons in the future?

╄→гoц情女王★ 提交于 2019-12-11 02:37:54
问题 Firefox is moving towards the WebExtensions standard which promises improvements in stability, cross-browser compatibility, and more security. At the same time they're gradually dropping support for legacy add-ons (bootstrapped extensions, add-on SDK, etc.). Unfortunately, the WebExtension APIs are much less powerful than legacy add-ons which by contrast have full control over the browser. I fully understand the motivation for the switch, but the features my add-on provides just can't

Updating self-hosted extensions through HTTP

巧了我就是萌 提交于 2019-12-11 01:48:19
问题 I'm transforming my SDK-based Firefox extension to WebExtensions and I've come to the issue of updating the extension. The current extension is hosted on my own domain (which is an HTTP domain), along with the update.rdf file. Now, for SDK-based add-ons, updates were possible via HTTP as long as the update manifest was signed using the McCoy tool and the valid hash of the update file was provided in the manifest. In addition to that, install.rdf would hold the public key portion of the key

Open custom page on the settings click, firefox addon SDK

萝らか妹 提交于 2019-12-11 01:34:17
问题 I'm using Firefox addon-SDK to create my addon. I use simple-prefs for the options, but how can I open custom page when user clicks on the "Settings" button in the Firefox addon manager? Thank you for any help! 回答1: As far as I know, you can't. If you have some preferences that cannot be expressed by the simple-prefs system, you could add a button in the preferences of your add-on that can open a custom page in a new tab, or window. See control type: https://addons.mozilla.org/en-US

How to make Firefox handle the result of a POST request with firefox-addon-sdk?

北城以北 提交于 2019-12-11 00:42:34
问题 I'd like to post images from my addon to my Servlet that processes the images and returns a PDF. The servlet works. I just don't know how to handle the resulting PDF from my addon. const request= require("sdk/request").Request; ... let req= request({ url: "http://localhost:8090/Whatever/PdfServlet", content: params, onComplete: function (response) { console.log(response.text) } }); req.post(); Here, object params contains the base64 encoded images. Everything works, I can see the beginning of

Firefox extension testing and developing - I'm confused

断了今生、忘了曾经 提交于 2019-12-10 23:54:40
问题 when I'm writing extension for Google Chrome, I only create "manifest.json" file and JS file, which is my script. after installing , I can change anything in the code, I only refresh browser and I had changed version of extension. 1) Can I change some code after installing Firefox extension? Or should I reinstall it? Or should I need to reload it again - and how if its possible? 2) should I create install.rdf, chrome.manifest, *.xul files and so in by hand (whick folder structure and so on)?

How to find out browser's user agent in Firefox Add On

倾然丶 夕夏残阳落幕 提交于 2019-12-10 19:54:14
问题 I'm creating (developing) a Firefox add-on and I need to find browser's user agent. The navigator.userAgent is not working. It shows that the navigator is not defined. What Firefox Add-on module do I need to get user agent or is there another way to find it out in an add-on? 回答1: In the SDK, first you need the chrome authority for Cc and Ci : const {Cc, Ci} = require("chrome"); The you can use the nsIHttpProtocolHandler to get the user agent from there: const httpproto = Cc["@mozilla.org

How can I log selected text with Firefox Addon Builder?

假装没事ソ 提交于 2019-12-10 19:13:46
问题 I have followed several tutorials with no success. I think this is the classic example but I can't make it work. I can save my project, install the addon and I can see the context menu item "Log Selection" when I select some text, but when I click on it nothing happens. exports.main = function() { var contextMenu = require("context-menu"); var request = require("request"); var selection = require("selection"); var menuItem = contextMenu.Item({ label: "Log Selection", context: contextMenu

How do I programatically open the Developer Tools' Console in a Firefox addon?

房东的猫 提交于 2019-12-10 18:23:36
问题 I have a simple context menu extension that logs an AngularJS scope to unsafeWindow.console : require("sdk/context-menu").contextMenu.Item({ label: "Inspect Angular scope", context: contextMenu.PageContext(), contentScript: 'self.on("click", function(node) {' + ' if (unsafeWindow.angular) {' + ' unsafeWindow.console.log(unsafeWindow.angular.element(node).scope());' + ' self.postMessage(true);' + ' } else {' + ' unsafeWindow.alert("No Angular scope available");' + ' }' + '});', onMessage: