firefox-addon

How to change directory before executing HG commands from firefox extension?

I am trying to execute hgtk log command for a particular file. But you cannot do it until you are in the repository directory. something like this... process.initwithpath("cmd.exe"); args = ["CD","c:\\MY_REPO"]; process.run(true,args,args.length); process.initwithpath("hg.exe"); args= ["hgtk","my_file.txt"]; process.run(true,args,a...

How can I run hg commands in the background (without showing the command prompt window) ?

I am using firefox extension to run hg commands on my repository. But when ever I execute any hg commands it shows command prompt window for a split second and closes it. Eg:- process.run("push"); process.run("update"); Is there any way to not show that window at all ? ...

Using processing.js inside a Firefox extension

I am curious to know if anyone has been successful using processing.js inside a Firefox extension. I am aware of the difficulties of using external libraries inside extensions and the fact that it has to be loaded in a way that will not pollute the global namespace, conflict with other extensions or Firefox itself. But with those conce...

How to add html elements to a non html page

I am trying to write a firefox plugin which could allow people to annotate their bookmarked web pages and store the annotations locally. I am doing this by inserting appropriate div elements inside the body of the page and attaching appropriate handlers for allowing drag/drop kind of interactions on these elements. While I can easily a...

Interaction between XUL windows

I'm a beginner with XUL. I have the following problem. In the browser overlay I declare a menu item which opens a new window - so far so good. menu_entry.addEventListener('command', function() { window.open('chrome://myextension/content/mywindow.xul', 'myextension-mywindow', 'chrome,centerscreen'); }, false); I'd like thi...

Advice on implementing my own console as an XPCOM

I want to use my own console for my extension, where I would be printing out various debug info. I thought I would do that by doing window.open("chrome://myextension/content/console.xul".. and then printing into textboxes of that window. Do you already see something wrong here? =) Now I have a small problem, window.open returns immedi...

HTTP POST in javascript in Firefox Extension

Hi there, I'm a newbie trying to do a simple HTTP post in JS within a Firefox extension.. This isn't passing through the parameters: var params = "a=1&b=2&c=3" req.open('POST', 'http://www.mywebsite.com/'); req.send(params); Any ideas on what I'm doing wrong? Thanks. ...

Using sockets (nsIServerSocket) in XPCOM component (Firefox Extension) (sockets + new window = seg faults)

PLEASE READ THE UPDATE #2 BELOW IF YOU ARE INTERESTED IN THIS PROBLEM ;) Say I put this code into the JS of my extension. var reader = { onInputStreamReady : function(input) { var sin = Cc["@mozilla.org/scriptableinputstream;1"] .createInstance(Ci.nsIScriptableInputStream); sin.init(input); ...

Detecting window load with XUL and running a Javascript function?

I am developing my first addon for Firefox, and I'm using the Extention Developer addon to help me. It has a real time XUL editor which I am using to design my form. At the moment this is what I have: <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="yourwindow" xmlns="http://www.mozilla.org/keymaster/gatekeep...

absolute css positions - firefox plugin to make it faster?

I do all my css work with firebug, using the up and down arrow keys to adjust top and left values. Anyone come across a firefox addon that lets me drag stuff around and then copy and paste the top and left values? edit: I have changed the question slightly from 'easier' to faster. Sorry for any confusion, I am not a beginner looking ...

Opacity and jQuery fadeIn/fadeOut in firefox extension

I'm having a hard time getting jquery fades and the opacity css element to respond to me in a firefox extension that I am writing. I am using FireFox 3.6. I'm pretty sure that these two problems are related. This code is not fading, it is simply popping on and off the screen after a four second wait: css_notify_div = { position: 'f...

Has anyone used "hstart.exe" ?

What I trying to do is to run hg commands using firefox extension without showing command prompt window all the time. I initiate process with hg.exe file and then execute hg commands by passing arguments in to it. process.init("hg.exe"); args["update"]; process.run(true,args,args.lenght); But I am confused how I am going to use hsta...

Is it okay to call canvas.drawWindow() from the "onload" handler?

The note at the bottom of this Mozilla wiki page currently says: "Using canvas.drawWindow() while handling a document's onload event doesn't work. In Firefox 3.5 or later, you can do this in a handler for the MozAfterPaint event to successfully draw HTML content into a canvas on page load." Which is fine, except that I tried it in Fire...

How to stop re-opening of firefox browser again & again to see the changes ?

I am working on a firefox extension. The problem is if I make any change in it, I need to close and then re-open firefox browser to see the changes . Is there any way I can see those changes by just refreshing the page ? ...

Adding screenshot functionality to a firefox extension

Is there a cross-platform approach to taking screenshots from a firefox extension? Ideally I'd like to be able to take a screenshot of a dom element (irrespective of whether it's visible on the page or not), something like: var screenshot = screenshot(document.getElementById('example'); Any pointers or suggestions would be nice, searc...

Capture mouse move from sidebar of a firefox plugin into the document

I am trying to do something like the following in my firefox plugin - I open a sidebar on which I show certain UI elements (like an image) and allow people to drag and drop those images from the sidebar onto the document. I am trying to achieve my goal by doing this: var currentWindow = Components.classes["@mozilla.org/appshell/wind...

Firefox extension, toolbar placement

Hi, I'm brand new to Firefox extensions and am trying to update an old extension (that worked with Firefox 2.0) to have it work with 3.0. Everything seems to work, except the toolbar appears below the statusbar (which it does not in 2.0). It seems like the placement of it has to do with this statement (the "insertafter"): <toolbar id="s...

Implement Enter key functionality to .js in Firefox Extension

I'm trying to make it so when the user presses a button on a Firefox extension, the button triggers the same function as if the user pressed the Enter key. The code is at http://github.com/cwill747/KioskKeyboard/blob/master/kioskkeyboard/content/overlay.js, that's where the whole project is, but I'll post it here too. doEnter: function...

Is there a way to mitigate downloading of resources (images/css and js files) with javascript?

I have a html page on my localhost - get_description.html. The snippet below is part of the code: <input type="text" id="url"/> <button id="get_description_button">Get description</button> <iframe id="description_container" src="#"/> When the button is clicked the src of the iframe is set to the url entered in the textbox. The pages...

I want to be able to search an html page that is refreshing every 10 seconds for the word "stat".

I want to be able to search an html page that is refreshing every 10 seconds for the word "stat". If the word is found I then want to alert the user through a pop up dialog and possibly a repeating sound until the user acknowledges it. UPDATE: Sorry the question was a bit ambiguous. I do not know a great deal about this stuff I just do...