xul

Replicating Google Chrome Browser Actions popup Effect in a Firefox Extension

Hi, Chrome Browser Actions provide a really nice popup effect by default. Hovering over the toolbar icon provides a neat hover effect. Clicking the toolbar icon shows a nice animation that opens the popup html file. The popup is aligned with the button that is pressed. Clicking the toolbar icon again fades out the popup. Any tho...

Firefox XUL toolbar problem with javascript getElementById

Hi all, I'm writing my first Firefox XUL toolbar, and am getting a strange behavior - in order to debug my code, I call the same js function from both the firefox toolbar and from a button on a very simple HTML file I created. The javascript function displays an alert window, gets an element using 'document.getElementById', changes its...

using popupNode in a javascript firefox extension

Hello, I am trying to use popupNode in a little javascript based firefox extension. So if a user right click on a link and then clicks on an additional menu item a new tab opens with the link (sorta like "open in new tab"): ` var foo = { onLoad: function() { // initialization code this.initialized = true; }, onMenuItemComm...

window.location.replace in firefox addon removes entire chorme!

Hi, I'm using the nsIWebProgressListener interface to find out if a url has been changed. If it has, I'd like to rewrite the link. Here's a snippet (code taken from the bottom of the page from the link above) var myExt_urlBarListener = { QueryInterface: function(aIID) { if (aIID.equals(Components.interfaces.nsIWebProgressListene...

XUL shortcut keys

Hi Friend, I am developing a Firefox add-on, and for that I have used overlay, now I want that if somebody presses the key like control+j it should open my extension, and if somebody presses ctrl+space it should execute a JavaScript function. I tried this: <keyset id="mainKeyset"> <key id="keyOpen" keycode="VK_J" oncommand="docume...

Retrieving HTTP status code from a loaded xul:browser tag

Thanks to everyone in advance - I took a look at this - http://stackoverflow.com/questions/1549831/an-observer-for-page-loads-in-a-custom-xulbrowser I am guessing that might be a path for determining the HTTP status code, but does anyone know of an easier way? I have flipped through the contentDocument as well...no dice. Any ideas? ...

Turn all links on a page into https within firefox

Lets just say that I wanted to be extra careful with the website I'm visiting (irrespective of whether the site is offered in https) and wanted to convert every href in the web page received into its https equivalent. Is there a way/add-on to do this ? or do I have to write my own :( ...

Is it possible to store a password in firefox, when request in XUL application?

I'm developing xul extension that has access to a remote system. User must set username and password in xul modal window to get access into the system, but firefox doesn't recognize that user has insert password and doesn't pourpose to save it. Is there some method to save it via firefox, or have I to build some function to store passwo...

How to extract website information using XPath inside firefox extension?

Hello, I have made a firefox extension which loads a web page using xmlhttprequest. My extension has it's own window opened alongside the main Firefox. The idea of my extension is to load a webpage in memory, modify it and publish in newly opened tab in firefox. The webpage has a div with id "Content". And that's the div i want to mo...

Opening the user's home folder?

My XULRunner application has a button named "Show Recordings". Pressing it should result in Windows Explorer opening the folder for the user. How can I achieve this? I can't find it in the File I/O documentation, perhaps I'm looking in the wrong place. Edit The problem is not finding the path, but telling the system to open the folder....

How do I position a XUL Panel (Firefox) in the bottom right hand corner of the main window?

I am creating a Firefox extension that pops up growl-like notifications. Currently I am popping them up relative to a status bar icon. This is fine unless there are other status bar extensions installed that would make my icon not the rightmost element. How would I go about positioning it so that the notifications always start at the bot...

Is this a known issue in firefox extensions on Mac OS?

I've developed a firefox extension which contains a small dialog defined by this XUL script: <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <prefwindow id="firenowPreferences" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="Fire.Now" ondialogaccept='on...

In regards to stopping a nsIRequest before completion and determining when a nsIRequest is complete (firefox extension)

Thanks to everyone in advance! I am using a xul:browser and attaching a nsIWebProgressListener to it. I am trying to accomplish two things: 1. Determine when a request is complete (when a document is completely load with all css/js/imgs). 2. Stop a request from completing, specifically URLs with files that issue the download prompt. In...

parsing HTML with Firefox

uri = 'http://www.nytimes.com/'; searchuri = 'http://www.google.com/search?'; searchuri += 'q='+ encodeURIComponent(uri) +'&btnG=Search+Directory&hl=en&cat=gwd%2FTop'; req = new XMLHttpRequest(); req.open('GET', searchuri, true); req.onreadystatechange = function (aEvt) { if (req.readyState == 4) { if(req.status == 200) { ...

How to implement a timer in a XPCOM component?

I'm creating a GStreamer application based on XULRunner. To achieve this created an XPCOM component that makes some of the GStreamer functionality available in a XUL application. However, GStreamer normally makes use of a message loop (GMainLoop) which enables one to receive bus messages. Because XULRunner already has its own message loo...

XUL textbox addEventListener

I'm trying to detect when a user hits escape or enter when in a xul textbox (firefox extension). But the following code doesn't seem to work. Any assistance would be much appreciated. const KEY_ENTER = 13; const KEY_ESCAPE = 27; function keyPressed(e) { switch (e.keyCode) { case KEY_ENTER: // do something ...

Can I use XPCOM to create and manipulate a Firefox window as I would use win32 COM with IE?

With win32 COM I create an Internet Explorer instance and control it almost fully from my python code (manipulate windows, DOM elements, etc). More specifically, using DispatchEx('InternetExplorer.Application'). Can I do the same using XPCOM and C++/python? I need to automate certain actions taken on the html ui of some websites, so no ...

Getting raw response data from with in a nsIWebProgressListener interface

Thanks to everyone in advance! I have attached a nsIWebProgressListener to a xul:browser and was wondering if it was possible to get the raw response data back? Getting the headers and body would be nice, but I am really just looking for the body. I looked into nsIRequest, which gets passed into all of the methods (onStateChange,onPr...

How to access window object from XUL?

I'm trying to set an onLoad event to the current web page from a firefox extension. I'm using the gBrowser object but I'm not sure if this is the best way. I would like to set an onLoad event to the web page window to execute some actions of the plugin as soon as the page is loaded. Thanks in advance. ...

XUL and Javascript

Hi all, I have the following XUL markup: <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window width="400" height="275" title="Placeholder" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:pen="http://www.pentaho.org/2008/xul" onload="mainToolbarHand...