Tag: firefox

Firefox select text range

A quick question: how do I programatically select the text fragment of the page in FireFox? For example, there’s a paragraph of text, user clicks the button and symbols from 10-th to 15-th are selected as if user dragged a mouse in a regular way.

FF extension: global variable that persists over multiple instances of the browser untill reset?

Can we use a Global variable that persists over multiple instances of the browser (FF)? I am building a ff extension which has to take the host& port name from the user once and then execute the menu options accordingly using that very host and port. This Host and port must remain same untill the […]

Does JavaScript have an equivalent to Perl's DESTROY method?

Is there any method that is called or event that is dispatched right before an Element is cleaned up by the JavaScript garbage collector? In Perl I would write: package MyObj; sub new {bless {}} sub DESTROY {print “cleaning up @_\n”} and then later: { my $obj = MyObj->new; # do something with obj } […]

Is there an API to disable/enable a Firefox extension?

Is there an API call allowing one to enable/disable a Firefox add-on?

After visiting links, Firefox selectively skips state change or a:visited styling

After clicking a link with a common href (local page or web-site) and the href is successfully loaded, both FF2 and IE7 will display the link with a:visited styling. For links with href=”javascript:anyfunc()”, IE7 works as above while FF2 does not display a:visited styling. No change with any DOCTYPE. Q: Is either behaviour with JS […]

Javascript & Firefox – Detect if window.open opens in a tab?

I’m doing some work with the new Facebook js library, http://github.com/facebook/connect-js. There’s one thing that bugs me, which is that when you are using Firefox and have the option “Open new windows in a new tab instead” enabled, the login popup opens in a new tab and then resizes the entire browser. It doesn’t restore […]

Activate Firefox tab in Greasemonkey/Javascript? Is this possible?

I developed a greasemonkey script that refreshes a page and checks for certain updates. I would like to run this script in a tab and browse the internet in another tab, but then have the script automatically activate it’s tab when an update is found. Im not sure how clear that was, maybe this is […]

How to enable local javascript to read/write files on my PC?

Since Greasemonkey can’t read/write files from a local hard disk, I’ve heard people suggesting Google gears but I’ve no idea about gears. So, I’ve decided to add a <script type=”text/javascript” src=”file:///c:/test.js”>/script> Now, this test will use FileSystemObject to read/write file. Since, the file:///c:/test.js is a javascript file from local hard disk, it should probably be […]

Firefox 3: Enable AJAX to localhost from outside domain

I am running a HTTP server on my development machine. I have a website, on some web server on the Internet. How can I get Firefox to allow communication from this website to localhost temporarily while I develop? Thanks, Isaac Waller

Send selected text to url using context menu as Firefox add-on

I have been doing some hours of research and trial and error on this topic but can’t seem to find a decent documentation or suggestions on how to get me started in the right direction. What I am trying to achieve is create my own Firefox add-on which is supposed to let you select text […]