firefox-addon

How to get rid of Pocket in Firefox?

妖精的绣舞 提交于 2020-01-24 01:47:31
问题 Unfortunately, Pocket is now "integrated" with Firefox, which means that it is not possible disable it in the Add-ons menu. I find the icon in the address bar especially annoying, as it is essentially just an always-visible advertisement for that webservice. How can I now get rid of Pocket in Firefox? 回答1: Another way to get ride of the pocket or disable is as follows visit about:config in Firefox Accept the Warning In search bar of that page (after all config value comes), search for Pocket.

Using positioning 'Panel' in new Jetpack API

丶灬走出姿态 提交于 2020-01-23 13:28:20
问题 I'm now using the new version of the Jetpack API of which allows you to create addons for Firefox using a JS framework. The 'panel' object is easy to use - but I'm struggling to find a way to position it. The documentation simply states (Jetpack Panel API) panel.show(anchor) DomElement But I'd like to position the panel in the bottom right corner of the window - How do I do this - and where can I find some more documentation about it. 回答1: The only way I'm aware of to be able to position a

My Firefox extension to inject CSS wont work

一世执手 提交于 2020-01-23 12:24:32
问题 I am busy developing a firefox extension. I am using the Add-on Builder What it will do: Get an ID from a PHP page (XMLHttpRequest) Call another function and send that ID with it That function inserts CSS with a link tag created by javascript My Problem: It won't work. If I alert the currenttheme variable, nothing happens. So the XMLHttpRequest doesn't seem to work. My code: main.js: var Widget = require("widget").Widget; var tabs = require('tabs'); exports.main = function() { var pageMod =

Firefox WebExtension: How Do I Run Code Prior to Disable/Uninstall?

烈酒焚心 提交于 2020-01-21 05:32:07
问题 I have recently converted a GreaseMonkey script of mine into a WebExtension, just to get a first impression of the process. Now I have a reached a point where it would be nice to do some clean-up or simply undo all my changes when said extension is disabled/uninstalled. From what I've seen on Mozilla's pages, runtime.onSuspend should do the trick. Unfortunately, it looks like that's not yet implemented (I'm on the regular Firefox release channel). In other words, what I want to do is run code

Firefox WebExtension: How Do I Run Code Prior to Disable/Uninstall?

微笑、不失礼 提交于 2020-01-21 05:32:07
问题 I have recently converted a GreaseMonkey script of mine into a WebExtension, just to get a first impression of the process. Now I have a reached a point where it would be nice to do some clean-up or simply undo all my changes when said extension is disabled/uninstalled. From what I've seen on Mozilla's pages, runtime.onSuspend should do the trick. Unfortunately, it looks like that's not yet implemented (I'm on the regular Firefox release channel). In other words, what I want to do is run code

Unable to use Components in WebExtensions: get “ReferenceError: Cu is not defined”

会有一股神秘感。 提交于 2020-01-20 08:50:11
问题 I have a simple extension where I use Cu.import to import a JavaScript code module. But, when I load the extension, I get this error: Cu is not defined The code I was trying to use was: Cu.import("resource://gre/modules/MatchPattern.jsm"); Cu.import("resource://gre/modules/BrowserUtils.jsm"); var regExArray = []; var myArray = ["facebook.com", "google.com"]; var myURL="http://www.google.co.uk/?gfe_rd"; for (var x=0; x<myArray.length; x++) { console.log("loop: "+x); var match = new

Unable to use Components in WebExtensions: get “ReferenceError: Cu is not defined”

旧巷老猫 提交于 2020-01-20 08:49:06
问题 I have a simple extension where I use Cu.import to import a JavaScript code module. But, when I load the extension, I get this error: Cu is not defined The code I was trying to use was: Cu.import("resource://gre/modules/MatchPattern.jsm"); Cu.import("resource://gre/modules/BrowserUtils.jsm"); var regExArray = []; var myArray = ["facebook.com", "google.com"]; var myURL="http://www.google.co.uk/?gfe_rd"; for (var x=0; x<myArray.length; x++) { console.log("loop: "+x); var match = new

.setAttribute(“disabled”, false); changes editable attribute to false

☆樱花仙子☆ 提交于 2020-01-18 16:06:01
问题 I want to have textboxes related to radiobuttons. Therefore each radio button should enable it's textbox and disable the others. However when I set the disabled attribute of textbox to true, it changes the editable attribute too. I tried setting editable attribute true again but it did not work. This was what I tried: JS function: function enable(id) { var eleman = document.getElementById(id); eleman.setAttribute("disabled", false); eleman.setAttribute("editable", true); } XUL elements:

.setAttribute(“disabled”, false); changes editable attribute to false

喜夏-厌秋 提交于 2020-01-18 16:05:53
问题 I want to have textboxes related to radiobuttons. Therefore each radio button should enable it's textbox and disable the others. However when I set the disabled attribute of textbox to true, it changes the editable attribute too. I tried setting editable attribute true again but it did not work. This was what I tried: JS function: function enable(id) { var eleman = document.getElementById(id); eleman.setAttribute("disabled", false); eleman.setAttribute("editable", true); } XUL elements:

.setAttribute(“disabled”, false); changes editable attribute to false

痴心易碎 提交于 2020-01-18 16:05:05
问题 I want to have textboxes related to radiobuttons. Therefore each radio button should enable it's textbox and disable the others. However when I set the disabled attribute of textbox to true, it changes the editable attribute too. I tried setting editable attribute true again but it did not work. This was what I tried: JS function: function enable(id) { var eleman = document.getElementById(id); eleman.setAttribute("disabled", false); eleman.setAttribute("editable", true); } XUL elements: