views:

300

answers:

2

Hello!

I am new to firefox extension building and would like some help on an application I am creating. I would like to create a firefox extension that on choosing to activate the firefox extension, opens a new tab and sends the script to the page to display a certain amount of text or perform some sort of activity. The only problem with this being that I do not know how to implement any of this in the javascript or xul file.

I have created the menu option in the javascript file and this is called from the XUL file. Can anyone help me create the script in the web page?

Thank you

+2  A: 

If the script you're looking to run is JavaScript, I'd recommend just using the GreaseMonkey add-on.

Matt Grande
Can Greasemonkey really do what (s)he wants? I.e. open a new tab and stuff?
Deniz Dogan
I believe so, but I've never tried.
Matt Grande
Javascript can't explicitly say to open a new tab since not all browser have tabs, but user preferences can make it so that _blank targeted links open in a tab rather than window.
Ben S
Ben, thanks for adding the link in.
Matt Grande
A: 

Wow that was a fast reply. Thanks a lot I'll try greasemonkey add-on

Lily