firefox toolbar event
Hi All, Does anyone know who to find an event occurrence on a toolbar in firefox. I want to do event logging on toolbar in firefox. Thanks ...
Hi All, Does anyone know who to find an event occurrence on a toolbar in firefox. I want to do event logging on toolbar in firefox. Thanks ...
Hello, Im making firefox extension and I have a problem with variables. Extension works with file (chrome://myextension/content/document.html) opened in few tabs. I want it to store a value in each tab, so I decided to store it in one of the html objects, that have got "Object" id: data="foobar" node=gBrowser.contentDocument.getElementB...
In my firefox extension I'm creating a xul:browser element. I want to have an observer that intercepts any url changes within the embedded browser and opens the url in a new browser tab (in the main browser). I'd also like new windows spawned by the xul:browser window to open in a tab instead of a new browser window. I've created an obs...
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...
Hi there I've been writing a Firefox extension, but have recently read a few articles explaining that it's bad practice to avoid variable name clashes by simple appending the application name to the front of the variable. Unfortunately I have been doing this. What is the best practice instead? I assume it's to somehow namespace the var...
I want to trap request for a my protocol from Firefox extension. For example if we type <my-protocol name>://... in address bar It should call a JavaScript function in an extension. I want to achieve it if possible without explicit settings. ...
One can bind Javascript events to html elements without using inline declarations. Is there a way when inspecting an html element to know which events are bound to the element? I want to know about the events defined by the developer and not the internal ones that come with the browser. So if I hover over an element and a menu shows up...
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...
I have a Firefox extension need to write to one files inside the extension's chrome folder, it works fine on windows and linux, but it give me 0x800520015 NS_ERROR_FILE_ACCESS_DENIED error. it is very strange, I manually set the file to have write permission, it works fine then. My question is where should I set something to tell MAC O...
I am new to firefox extension development. I am building an extension which needs to run for each page the user browses. At the moment the extension runs when firefox window starts. I have pasted code below. XUL Code: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="mainWin" title="my ex...
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...
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 ...
I'm attaching some functionality to javascript by doing a firefox addon. However when coding in chrome and listening to the load event in the chrome overlay triggers for every loaded tab, but the "content" variable only points to the tab currently in the foreground. How can I get the content of every tab upon document load from a firefo...
Hi, I am developing an extension for firefox and i have created a SQLite DB. When inserting values into the table i get an error message: Error: Permission denied for http://en.wikipedia.org to call method UnnamedClass.toString on <>. The string values to be inserted are stored in a variable. var book = "Harry Potter"; var myInsertQuer...
I'm trying to add hidden browser element dynamically from Firefox extension but, although it adds successfully, it gives me Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWebNavigation.sessionHistory]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://global/content/bind...
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 ...
I've developed an extension that creates alot* of data during a browsing session. Think, 2 to 3 times the total HTTP traffic (images, HTML, etc.). Currently I'm just stashing all of this in a Javascript variable, but this obviously isn't tenable if the extension is going to get any serious usage. So, the question is, where should I st...
Hi, i am developing a firefox extension, On a client side of a web page i add a link and on clicking the link i intend to open a window where it will allow the user to type in text. when i click the link, it opens the window but it won't allow me to write to it. e.g. ww.document.write('<div id = "textDiv">') ; here it gives me an erro...
I'm creating a Firefox add-on that does the following: Drag+drop a file into Firefox If the file has a certain extension and if FF is running on a certain OS, parse the file with regex Extract a url Go to that page The JavaScript for all of this is pretty straight-forward except for the drag+drop into FF part. How can that be done? ...
I have a string such as <html><body><div id="message">Hello World!</div></body></html> and I would like to get the content of the #message element without parsing the HTML myself. I thought maybe I could create a document object from a string in Gecko (this is for a Firefox add on) but I don't see any simple way. I noticed that ther...