Tag: firefox

Equivalent of simple storage API for restartless firefox extension

Is there an equivalent to this API or a way to call it from a restartless extension? I need to store a few strings between browser sessions. I have found this but it seems too complicated for simple string storage. Does the SS API use the same thing behind the scene?

Firefox Bookmarklet: Exposing functions to the global namespace

I’m working on a moderately-complex Bookmarklet that works just fine in Chrome, but I can’t get it to work in Firefox. When I run my Bookmarklet in Firefox it redirects to a new page that only says true on it. I’ve narrowed the cause down to a very specific thing: Firefox doesn’t seem to like […]

Firefox says could not download the search plugin from

Backstory: I’m trying to dynamically generate an OpenSearch search plugin for Firefox based on user entered values as part of a larger add-on. I’m not including the forms and cruft surrounding it, because I’ve narrowed it down to a simple failing test case trying to import any XML. Code: Simplified JS var browserSearchService = Components […]

Change the behavior of the F5 button

I want to change the behavior of the F5 refresh button of the browser for example when user click on F5 the page will not be refreshed and some alert will appear ,Currently I’ve tried with this code(which I find in after search in the forum) but it’s not working,Im having reference to jquery cdn.any […]

Is canvas element in html5 hardware accelerated?

I’m pretty new to web development, in fact I’m thinking of diving into html and js for game developing. So, before doing anything, I need to know whether or not the “canvas” element in html5 is hardware accelerated. If it’s not, then I would need to use something like webgl? I don’t know if it […]

Why does the timeout fire before the “click” event loop is complete on Firefox?

Steps: run code in the Firefox wait 5 seconds (important!) Press OK or Cancel expect flag == 0, but it is 10. var flag; function myFunction(){ flag = 0 console.info(“initial”, flag); setTimeout(function(){ flag = 10; }, 200); confirm(“conf”); alert(“should be 0: “+flag); } document.getElementById(‘button’).onclick=myFunction; <button type=”button” id=”button”>Click Me!</button>

js regular expression “/(\s|\uFEFF|\xA0)+$/” makes firefox and chrome busy

When I try to call a function of CrossUI(a js framework) to rtrim text contents of DOM which is grep by jQuery, the firefox and chrome will be run into busy. I found this regular expression in the source code blocks the browser. I tried /[\s\uFEFF\xA0]+$/ and it works. Why /(\s|\uFEFF|\xA0)+$/ is stuck? What’s internal […]

How do I prevent a swf from refreshing when an iframe is resized?

I am resizing an iframe, and when I do that in Firefox, the content gets refreshed. I have a swf that extends, and in Firefox when the iframe extends to accommodate the swf, the swf appears in its normal position. In IE this doesn’t happen. Anyone know how to prevent the refresh from happening in […]

Internet Explorer 7 – Javascript 'undefined' not testing

I’m having trouble with some JS in IE7. I’m testing to see if a certain object has a className (its possibly an HTMLElement object from the DOM) assigned. Now, testing the page in Firefox tells me that Yes, the variable is undefined (all my tests below do the Alert(). In IE, none of the tests […]

setting top.location.hash with %20 in firefox

In firefox, using this javascript: top.location.hash = “#here%20are%20spaces”; changes the browser url to: http://mysite.com/#here are spaces I expected firefox to show the encoded spaces as %20 in the browser url. What’s going on here? Why is firefox not setting the url to the string as I passed it? How can I force firefox to update […]