xul

window.openDialog does not remove the titlebar on linux

I use the following code to display a popup: var win = window.openDialog("chrome://broceliand/content/view/popup/nameMapPopup.xul", "", "all=no," + "titlebar=no," + "chrome=yes," + "toolbar=no," + "dialog=no," + "resizable=no," + "modal=yes," + ...

Firefox Extension - Need a specific div to ignore xhtml errors (mismatched tag, etc).

Hello, My firefox extension loads content from a 3rd party site into an overlay panel. This content is user generated and sometimes will, for instance, have an image tag that does not close which causes a mismatched tag error to be thrown and the extension fails. Is there any way I can sandbox this content so that these kind of errors a...

User Interface Markup Language pros and cons...

I learnt about some declarative UI languages such as XUL for Mozilla/Gecko and HTA for Microsoft at Wikipedia. What would be the advantages/disadvantages of these markup languages? Why don't common OSes and Applications use these techniques? Do these languages impart flexibility to the system? Are there any OSes that use markup lan...

How to catch xulrunners close event and cancel it?

Hi, I want to catch the close event of my xulrunner app when user clicks the close button of the main window and ask them for confirmation.If they dont confirm ,i want to cancel this close event and continue the application. I tried OnClose Event ,but i was not able to cancel it. How do i implement this? ...

Export Awesomebar history in Firefox

Is there any way to export the history information from the Firefox address bar into a file? I have been searching for docs online, but cannot find a solution. Thanks! ...

Do Mozilla apps have access to the process manager?

So really I have 3 questions, but they are all pretty straightforward (for once): Can an add-on in Firefox see if there are multiple instances of Firefox/the firefox process running? Since the only way (in Windows, at least) to have multiple instances of Firefox running is by having them run under different profiles, is it possible for...

Reading web-page cookies from a Firefox extension (XUL)

Hi, I'm creating an extension for the Firefox browser. I would like to read a cookie which was set by an HTML page using JavaScript in the XUL file. Is it possible? I tried using document.cookie, but it doesn't work: function readCookie(name) { var ca = document.cookie.split(';'); var nameEQ = name + "="; for(var i=0; i < ca.len...

Does anybody know of a good beginner's tutorial on XUL?

Hi Guys, I was looking for a good tutorial on XUL for beginners. Also, it would be great if somebody could point me to a comprehensive reference as well. Thanks ...

Correct way to restore Firefox preferences when Add-On uninstalled by external application

I have written an application suite on Windows which amongst other things installs a Firefox add-on which once run modifies the Firefox network preferences by interfacing with nsIPrefService. The extension itself resides in a folder under Program Files along with other parts of the application which work together with each other. Since...

How to add event 'TabOpen' to all windows in a Firefox extension?

I'm writing a Firefox extension. I'd like to have my code executed whenever a new tab opens. I've tried this: for (var i=0; i<Application.windows.length; i++) { var w = Application.windows[i]; w.events.addListener("TabOpen", function(event){ alert( 'tab #'+w.activeTab.index +' opened'); }); } It doesn't work right if window...

XUL attaching events to anchors added with javascript

I'm writing a firefox extension that adds event listeners to all the anchor tags on a page. Essentially I have: window.addEventListener("load", function() { myExtension.init(); }, false); var myExtension = { init: function() { var appcontent = document.getElementById("appcontent"); if(appcontent) appcontent.addEv...

Possible to disable javascript within a xul:browser element (firefox extension)?

I need to render user submitted html within an xul:panel. I'm inserting the html into an xul:browser element within the panel so that invalid xhtml is not an issue (it's sandboxed within the browser frame). Is there anyway to disable javascript within the xul:browser? My original plan was to write some regex that strips out all JS from ...

WYSIWYG Editor for XUL

Can anybody recommend a good graphic WYSIWYG editor for XUL? ...

Annotate a webpage on the client side

Hi I am trying to develop a firefox add-on which would allow me to highlight a text on the web page (any webpage client side) and then allwo me to write a note and save it. So when i visit the web page next time, if an annotation exists for a webpage it shows up a small Anchor/link next to the text, which on clciking should display the ...

How to insert XUL into a XHTML document

I have a XHTML document and wnat to embed XUL widgets into the document. What is the correct XML syntax to do so? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" co...

Embedding SVG in XUL

I want to Embed SVG into XUL. I tried to use the this tutorial which requires pasting of the SVG code in XUL application and it works but this is not clean. I want to keep SVG and XUL files separate, further I will like to use a separate CSS file for SVG part, any examples how we can do this? ...

Center a xul dialog to screen

In a dialog, I resize some images and then force the window to sizeToContent. Then, I want the dialog to center itself to the screen. How can I do this? ...

In what order do Firefox extensions get initialised?

When a user has several Firefox extensions, what decides the order in which they get initialised? Specifically, in which order are XUL overlays applied? In most cases the order is not important, but it does affect things like the order in which items appear on the Tools menu, say, or in the status bar. Furthermore, being able to rely on ...

XPath expression exception

Hi I am not really sure if i am doing this right with XPath expression. I am trying to locate a text on DOM and this text is assingned to a variable. I have text stored in SQLite and i have retrievd the text and i am trying to locate it on the webpage which actually contains the text. so i ahve the following code: var searchText = dat...

What context does the Javascript for XUL execute in?

Is it possible for the javascript you write for a XUL component to interact with the javascript defined in a webpage? Eg, if a particular webpage has a dooSomethingNeat() function, can I have a button defined in a XUL overlay execute that function, or does it live in another namespace? Put another way: if I'm looking to enhance the fun...