xul

Firefox: Get mouse coordinates of top-left corner of viewport

Good day everyone. I am working on a Firefox extension, and I want to pop up a tooltip at a certain offset from the mouse cursor. However, the problem comes when this offset is out of the viewport. It gets displayed but the user will have to scroll over there. I hope to enhance this by moving the tooltip pop-up within the current viewpo...

Implementing splitter with no width inside a box

Hi, I have horizontal box consisting of 4 other boxes separated by splitters. I want to use splitter that looks like the tree-splitter (with no width), but whenever im trying to use it splitters dissapear and the collumns cannot be resized. Any ideas why? Or have you got any idea how can I implement a splitter that would look like one w...

Intercepting mouse over href from Firefox extension

How can I know the url under the mouse cursor from a firefox extension? I need to interact with the href from within the overlay.js file. I'd want a lightweight solution, for example I don't want to attach some event to all hrefs found in a page. I'd rate a mouseover solution but how can't find anything useful for me! Thanks ...

Getting XUL:Scale to show what numeric value is selected

I'm working with XUL, and below is abasic slider/scale implementation: <scale value="1" min="1" max="10" increment="1"/> However I want a numbox next to it which displays the value selected in the slider, and maybe I didn't look hard enough in the XUL tutorial, but I couldn't find a feasible answer. ...

Identifying Video on a webpage

Hello All, I am trying to code a Firefox extension, that can get the video (youtube/vimeo) property (path, etc.) when a user right-clicks on it on a web page. The problem, i see is right-click brings menu system native to the player. Any pointer would be really helpful. Thanks. ...

Firefox Extension Development: Adding Tabs to the Preference Pane?

I'm adding this: <prefwindow id="BrowserPreferences"> <!-- Create a new pane (tab) --> <prefpane id="whateverPrefs" label="yes!" onpaneload="alert('hey')" image="chrome://helloworld/content/images/man.png"> <!-- Intermediary between GUI and preferences system --> <preferences> ...

How to develop toolbar with XUL.

I'm a beginner and I've never used XUL, I've downloaded XULRunner , Could anyone tell me how to start with it. all I need is to design a toolbar. ...

How do I close a browser tab when the scrollbar reaches the bottom of the page?

Using Autohotkey, I’ve remapped a button to execute a loop. Every 30 seconds, PgDn will execute. In order to move on to the next tab, Ctrl-W (close tab) needs to happen. Is there way any to detect that the scrollbar as at the bottom? Once the “scrollbar-at-bottom” condition is met, PgDn will execute “close tab” instead. What language sho...

Firefox extension multiline notification

I'm currently developing a firefox extension that monitores some ressource on the web and displays a notification for certain events. Currently I'm using the 'nsIAlertService' the following way: var alertsService = Components.classes["@mozilla.org/alerts-service;1"].getService(Components.interfaces.nsIAlertsService); alertsService.showA...

Firefox addon development: how to create empty numeric or date boxes

I'm trying to create a form with a few fields in XUL. I failed to find a way to create a numeric box and a datepicker with empty values. Textbox of type number has a default "0" value, I can change the default to different number, but I want the box to remain empty. The same goes for the datepicker element, I must specify a valid date, b...

change the TAB character length in a XUL textbox element

Is it possible to change the length of the TAB (\t) character (currently 8 characters) displayed in a XUL <textbox> element ? Note that I want to avoid replacing TABs with spaces. ...

How can I read the source URL of a file downloaded with FireFox from an external application?

I have an C++ app I built which is registered as the default handler for a file with a specific extension. So when I download one of these files with Firefox from a website, it downloads it to a temp directory and then shell executes my app while passing the full path to the downloaded file on the command line. What is the best way to ...

How to change statusbarpanel background color in firefox extension

I'm writing a firefox extension which displays a statusbarpanel containing some text. I want to change the background color of my statusbarpanel depending on the message. e.g. red background for errors. var pnl = document.getElementById("panelId"); pnl.label = "OK"; pnl.style.color = "white"; pnl.style.backgroundColor = "green"; All o...

Storing cookies via XUL using document.cookie

Hello Everyone, I created a FireFox extension. This extension has some configuration settings and I'd like to store them in a cookie. To store information in a cookie I used the regular JavaScript property document.cookie Initially everything seemed to work fine, but then I noticed that the cookie is just a session cookie. Whenever I r...

xul-Get selection html

Hello, I have the following function that is supposed to get HTMLs for the user selected area on the web page. This function does not seems to work properly. Sometime, it gets htmls which is not selected also. Can anyone please look into this function? -- Thanks a lot. //----------------------------Get Selected HTML-----------------...

Flexible canvas in XUL

Hi all, I have a XULRunner application that I want to have display 2d graphics in a HTML element. I would like to be able to repaint those graphics when the window resizes. The layout looks something like this: <box flex="1" id="canvas-box"> <html:canvas id="canvas" flex="1"> </html:canvas> </box> First of all the "width" and "heigh...

XUL Testing Tools

Are there any tools for testing XUL? I'm using yui test for testing XPCOM. But I can't find any for XUL ...

Time since last user actitivty in firefox

I'm currently developing a firefox extension which checks some server side XML-File on a regular basis (every 2 minutes). I want to add the following feature: Whenever the user is inactive for X minutes the check interval is extended by a multiplicatior of Y until a limit of Z is reached. In order to do so, I need the inactivity time. I...

How obsolete is "Creating Applications with Mozilla"? (the book)

I have the book "Creating Applications with Mozilla", though I haven't read it yet. According to the book's web site at http://books.mozdev.org/, It is "very out of date." How out of date is it? Is it a decent reference, but doesn't cover new APIs, or is the stuff it covers things you shouldn't be using anymore? Is it decent as a XUL/XB...

NS_ERROR_XPC_GS_RETURNED_FAILURE error code

I'm developing extension for Firefox which calls XPCOM component writen in C++ and I get this error: [Exception... "Component returned failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]" nsresult: "0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE)" location: "JS frame :: chrome://testtest/content/mytest.js ...