When installing a webextension, does the mere existence of a background.js file negatively impact performance* at all, considering that it is a separate javascript file that must be loaded? For most practical cases one could assume the answer is “pretty much No,” but in the case of an older comput…
Tag: firefox-addon
How to manipulate webRequest cookie in a cross-browser extension?
I am trying to edit cookie for all API calls using webRequest from a cross-browser (supporting chrome and Firefox) extension which I am creating. Following is the code: Problem: In Chrome, the code works with extraHeaders and in Firefox the same code works only if extraHeaders is removed. How can I make it wo…
BlockingResponse in Firefox extension
I’m attempting to redirect a user in a Firefox extension like so: I’ve added webRequest and webRequestBlocking permissions in the manifest. In the debugger, I see that I am reaching the return statement with the redirectUrl correctly set, but the webpage does not redirect. I would assume this shou…
page_action click does not work while browser_action click works in Chrome Extension?
I want to make a simple browser extension like Font Face Ninja which toggles UI when page_action or browser_action is clicked. The following code using browser_action works – background.js manifest.json While the following code using page_action does not work – background.js manifest.json Accordin…
Bootstrap addon create options button with arbitrary js
I figured out from Bugzilla that you can set your options url in install.rdf to arbitrary js and it will run perfectly fine. The only issue is that the window deactivates, its as if an invisible dialog has opened over it, and no matter what you can’t close it. For example: In my addon here: simple test …
.setAttribute(“disabled”, false); changes editable attribute to false
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 wa…
Increase (youtube flash) video’s sound volume by means of JavaScript
Background story: many users (including me) browse the web from notebooks that are not constructed for sound performance. That means (besides other things) that the sound volume for most videos is too low, especially if the video itself is recorded at low volume. Therefore… I was wondering if there is a…
How to get notified about changes of the history via history.pushState?
So now that HTML5 introduces history.pushState to change the browsers history, websites start using this in combination with Ajax instead of changing the fragment identifier of the URL. Sadly that means that those calls cannot be detect anymore by onhashchange. My question is: Is there a reliable way (hack? ;…
On Text Highlight Event?
I’m curious if anyone knows how I would trigger a function to run if/once the user finishes selecting text on the web page? I would like the user to be able to select text, and after a short delay(or immediately, at this point it doesn’t matter much) an overlay button appears near the text that th…
How to get info from another website from my HTML page?
What is needed is as follows: I have an HTML webpage and I need to access another website and get something from its source code. I want to run something like to get what I need from the link and use it! However, I am using Jetpack slide bar. Does it have to do anything with HTTP requests? Answer I