xul

how get I notified when the "onload" script has finished

I get a notification when a html page is loaded -> onStateChange, stateFlags: STATE_IS_NETWORK + STATE_STOP but I need a notification when the page ist loaded and a onload script has finished running. Any hints ? THX ...

Standalone XULRunner app not loading the Flash player plugin

Hi, I have created a standalone XUL application, and I copied "NPSWF32.dll"(flash plugin dll) to the "plugins" folder under the browser. When I launch the application, flash content is not getting displayed. If I set the MOZ_PLUGIN_PATH to the "plugins" directory before launching the application, everything is working as expected. Cou...

Firefox-Addon: Restart and save all current tabs and windows

Hello guys / gals, First off, this is my first attempt at writing an add-on. That being said, I am attempting to write an add-on that makes some configuration changes and needs to restart Firefox in order to have the changes take effect. I am currently restarting Firefox using the following code: var boot = Components.classes...

How to tell if XUL menupopup opens down or up?

I have an extension that can be placed on any toolbar (like the bookmarks, menu or status bars). In general, the context menu opens downward, but when placed on the status bar and Firefox is closed to the bottom of the screen, the context menu opens upward. I'd like to try reordering the context menu based on its up or down orientation, ...

FF extension. how to show data extracted in a javascript function to the dropdown menu in the browser (in the same popup on which the function is implemented)

I am developing a ff extension. On one menupopup, the onpopupshowing calls a javascript function. Tha JS function extracts a list of names. Now these names have to be displayed in the same popup. How can i get this? Basically i will need to pass the data (just as we use beans in java) to the browser from the JS function. The data can ch...

XUL - traffic monitoring for a special browser window in a firefox extension only

I hope you can help me with some code to monitor sent bytes (especially if a user is uploading a file in a web formular). For my extension a have a new window(id=rootWnd) in which is my . What I want to add now is the possibility to monitor all the traffic that is sent on a single request on this browser only, especially if a user start...

How to display changing data in XUL

Hi, I'm trying to build a firefox extension which can get rss feeds and display them in a popup panel. But I'm not aware about how to display feeds in a panel(I know how to display static text).Because the feed is varying all the time. Any help regarding this matter will be appreciated. Thanks in advance. ...

ff extension. how to pass parameters to a function in the oncommand attribute in menu

I have a ff extension which creates a popup and shows dynamic data in it. basically when the popup opens a js function is run which then constructs the popup list by appending the items like this var myMenuPopup = document.getElementById("file-popup4"); newItem = document.createElement("menuitem"); newItem.setAttribute("label", namelist...

CSS [custom?] attributes

radio[pane] { list-style-image: url("jar:resource:///chrome/classic.jar! /skin/classic/browser/preferences/Options.png"); } radio[pane="prefpane-appearance"] { -moz-image-region: rect(0px, 32px, 32px, 0px); } radio[pane="prefpane-appearance"]:hover, radio[pane="prefpane-appearance"][selected="true"] { -moz-image-region: rect...

XUL: fit all elements vertically in prefpane

here goes the XUL part of one of the preference panes. <prefpane id="alt-about" label="About" image="chrome://alt/skin/about.png"> <hbox> <vbox> <image id="alt-about-logo" /> </vbox> <vbox> <description id="addonName">Bla bla bla, bla bla</description> <description id="version...

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 user resets it (for which an option will ...

FF extension: saving a value in preferences and retrieving in the js file

I am making an extension which should take a link as the user input only once. Then the entire extension keeps using that link on various functions in the JS file. When the user changes it, the value accessed by the js file also changes accordingly. I am using the following but it does not work for me var pref_manager = Components.class...

XUL/Firefox Extension: Determine scroll position of main window

I'm developing firefox sidebar that interacts with the main browser window. When a button within the sidebar is clicked, I need to be able to determine how far down the current page the user has scrolled. Anybody have any ideas? I can't seem to find the right combination. ...

FF extension: a popup with dynamic menuitems, with each menu item having another popup

I am building an extension that has a popup whose elements are constructed by a function call everytime the mouse hovers over the popup option. I am able to achieve this. Now I need to have a popup for each of the menu item (inside the original popup) which is not dynamic though. I have this code, but it does not work: var myMenuPopup =...

popup with dynamic menuitems, each menuitem is another popup

I am building an extension that has a pop up whose elements are constructed by a function call everytime the mouse hovers over the popup option. I am able to achieve this. Now I need to have a popup for each of the menu item (inside the original popup) which is not dynamic though. I have this code, but it does not work: for (var m=0; m ...

XUL: how to render special html entities(copy, trade, deg...)?

If I just put in label value or anywhere else &trade; or &deg; it will give me parse error. ...

html entity is not rendered

If I just put in XUL file <label value="&#176;C"/> it works fine. However, I need to assing &#176; value to that label element and it doesn't show degree symbol, instead literal value. UPD sorry guys, I just missed couple words here - it doesn't work from within javascript - if I assign mylablel.value = degree + "&#176;" - this wil...

Firefox XUL toolbar with javascript to IE?

Hi, I have developed a Firefox toolbar in XUL, which uses javascript to manipulate the DOM. I'd like to export this to IE. I know that IE doesn't support XUL, but wonder: (1) is there an easy way to use the existing javascript code for the IE toolbar as well? (2) is there a IE installer that easily creates all necessary registry val...

tree element in firefox sidebar with dynamic elements and click functionality

I have created an extension to show a sidebar in firefox. Now i need to display a tree like structure where the third level will be dynamic and loads a particular link on clicking. I know how to create the three level hierarchy but with static data.. heres the code <treechildren> <treeitem container="true" o...

open a link in a new tab in the same window

Hi I am making a firefox extension which needs to open a link in anew tab in the same window of firefox. How should i do this? This opens in a new window (replacing the old window): window.location = url; This opens in the same tab window.content.document.location = url Any idea on how to open the url in a new tab? ...