Mozilla.com

  1. MDC
  2. Main Page
  3. Extensions
  4. Questions and answers from the newsgroups 2006 11 10
Table of contents
  1. 1. FAQ
        1. 1.1.1.1. Is there a simple POP3 or IMAP Mail notifier for FireFox 2?
        2. 1.1.1.2. Is there are way to give Firefox command line arguments which will cause it to load the specified URL and save the image rendered to the specified file?
        3. 1.1.1.3. I have created a Firefox sidebar extension that display correctly, but I can't get my JavaScript to reference the objects in it to make updates to the content. How can I do this?
        4. 1.1.1.4. Is there any way I can parse ill formed HTML documents?
        5. 1.1.1.5. I need to get the URL from a tab I added. How do I do that?
        6. 1.1.1.6. I need to listen for whenever a single bookmark is clicked. Which event would I listen for, and where would I put the event listener, if I wanted to capture every bookmark load?
        7. 1.1.1.7. I am having some issues with an extension I am writing; I am unable to use the < (less than) sign in scripts as it gives me an error message. Why is that?
        8. 1.1.1.8. I'm updating an extension I wrote for Firefox to work in the status bar in Thunderbird, and everything's working except that when I right-click it, the context menu isn't popping up. Why is that?
        9. 1.1.1.9. Anyone know if I can use an animated GIF as the value of the src property on a StatusBarPanel?
        10. 1.1.1.10. Is anyone aware of a "security best practices" type of document for extension development?
  2. 2. UAQ
        1. 2.1.1.1. Why doesn't addEventListener fire events?
        2. 2.1.1.2. Just wondering if anyone has managed to create an extension that would allow Thunderbird to request delivery receipts, and not just read receipts?
        3. 2.1.1.3. We are trying to mimic classical flyweight pattern via singleton XPCOM component. Is there a service or component that we can use already?
Redirected from En/Extensions:Questions and answers from the newsgroups 2006 11 10

Questions and answers from the newsgroups 2006 11 10

Table of contents
  1. 1. FAQ
        1. 1.1.1.1. Is there a simple POP3 or IMAP Mail notifier for FireFox 2?
        2. 1.1.1.2. Is there are way to give Firefox command line arguments which will cause it to load the specified URL and save the image rendered to the specified file?
        3. 1.1.1.3. I have created a Firefox sidebar extension that display correctly, but I can't get my JavaScript to reference the objects in it to make updates to the content. How can I do this?
        4. 1.1.1.4. Is there any way I can parse ill formed HTML documents?
        5. 1.1.1.5. I need to get the URL from a tab I added. How do I do that?
        6. 1.1.1.6. I need to listen for whenever a single bookmark is clicked. Which event would I listen for, and where would I put the event listener, if I wanted to capture every bookmark load?
        7. 1.1.1.7. I am having some issues with an extension I am writing; I am unable to use the < (less than) sign in scripts as it gives me an error message. Why is that?
        8. 1.1.1.8. I'm updating an extension I wrote for Firefox to work in the status bar in Thunderbird, and everything's working except that when I right-click it, the context menu isn't popping up. Why is that?
        9. 1.1.1.9. Anyone know if I can use an animated GIF as the value of the src property on a StatusBarPanel?
        10. 1.1.1.10. Is anyone aware of a "security best practices" type of document for extension development?
  2. 2. UAQ
        1. 2.1.1.1. Why doesn't addEventListener fire events?
        2. 2.1.1.2. Just wondering if anyone has managed to create an extension that would allow Thunderbird to request delivery receipts, and not just read receipts?
        3. 2.1.1.3. We are trying to mimic classical flyweight pattern via singleton XPCOM component. Is there a service or component that we can use already?

Return to mozilla-dev-extensions


FAQ

(↑ top)

Is there a simple POP3 or IMAP Mail notifier for FireFox 2?

I don't know if its working with multiple accounts, but heres a good notifier named "Get Mail" for Firefox < 2.0 ! Direct Installationurl : http://install.erweiterungen.de/GetM...5_fx_de-DE.xpi (German Version) More informations: http://webdesigns.ms11.net/chromeditp.html#getmail maybe u can use the "Google Mail Notifier"? Download here Works with Firefox 1.0 - 3.0a1

I have created a Firefox sidebar extension that display correctly, but I can't get my JavaScript to reference the objects in it to make updates to the content. How can I do this?

My first thought is that you are getting the current page document but the sidebar is not the current document so you will get back a null object. You need to reference the document object of your sidebar page otherwise your ID in your sidebar will not be found. Two separate documents. You are referencing the current page document but not the sidebar's.

I need to get the URL from a tab I added. How do I do that?

var myBrowser = getBrowser().getBrowserForTab(myTab);

var myURL = myBrowser.currentURI.spec;

I need to listen for whenever a single bookmark is clicked. Which event would I listen for, and where would I put the event listener, if I wanted to capture every bookmark load?

Look through the DOM using the Inspector. Find the id for the menupopup of the bookmarks. Add a click event to the bookmarks menupopup. You could then evaluate the target of the event that occurs to determine the url of the bookmark clicked. Do a search for target event xul.

I am having some issues with an extension I am writing; I am unable to use the < (less than) sign in scripts as it gives me an error message. Why is that?

I suspect this script is in a XUL file. There are 3 ways (perhaps more) to fix this:

1. Leave the script code in the XUL file but escape XML entities appropriately; e.g., < should be < > should be > & should be & " should be " etc. (see http://www.w3schools.com/xml/xml_cdata.asp for list)

2. Move the script code into a js file. Include that file in the XUL like so:

<script src="myjs.js"/>

3. Leave the script code in the XUL file but enclose the script code in a CDATA section; i.e.:

<script><![CDATA[// my code]]></script> 
Anyone know if I can use an animated GIF as the value of the src property on a StatusBarPanel?
var statusBarPanel = document.getElementById("my-statusbarpanel");
statusBarPanel.setAttribute("src", "myAnimatedGIF.gif");

and yes, it will animate.

Page last modified 17:56, 27 May 2007 by Ptak82

Tags:

Files (0)