• 0

[XUL, JS] Firefox Extenstion Development Help


Question

I'm not sure if this is the right place to ask but here goes:

I'm trying to add a button to the customizable toolbar in Firefox 1.5 that when clicked will take me to my localhost web server by my current public IP. Since I dont' have a static IP, I thought this might be more convienient than having to change a bookmark everytime my ISP changes my IP.

Anyway, I've been able to add the button with an overlay and write the JavaScript to obtain my IP. I have two problems though.

First, the button that's added with the overlay is aligned all the way to right of the customizable toolbar. When I try to move it, it just stays there. I've tried using the 'insertbefore' attribute with one of the other button's IDs on the 'toolbarbutton' element too, but that doesn't work either.

Second, I don't know how to load a page into the browser window with JavaScript. I tried using window.location, but that replaces the entire Firefox window with my host page instead of just the browser window.

Any ideas?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

I figured it out.

I added the button to the toolbar palette instead of straight to the toolbar for the position problem and used content.location.href to load the page into the browser window.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.