views:

27

answers:

1

I'd like to create an addon for Firefox that would enable me to search a particular site by selecting text on one site and choosing to search another site by selecting that option in the context menu.

I already have an extension like that in my browser - the Wikipedia Lookup extension. Basically, I want the exact same functionality but which will send the search text to a different site.

I'm completely new to Firefox addons, so can somebody tell me what's involved in this? Or point me at a site with a list of instructions to do a plugin like this? I can see examples on how to make a Hello World kind of plugin but I can't see how to extend that example into what I need. Thanks.

+1  A: 

Have you considered opening the Wikipedia extension source and modifying the pointer from wikipedia.com to the other search site? Assuming you're using Windows Vista or higher, The source code should be located:

C:\Users\YourUserName\AppData\Roaming\Mozilla\Firefox\Profiles\xxxxxxxx.default\extensions\[email protected]\chrome\content

You would then have to modify the source code inside to change the pointer, and the POST variables string to match that of the site you will be using.

I hope this at least points you in the general direction!

-Alex

Alex
+1 for the great idea. that never occurred to me. I'll try it later and let you know.
DaveDev
Did this work for you?
Alex
I don't know yet - I'm only getting a chance to really look into it this evening. Regardless, I'll still mark this as correct. The reason being that your answer gives me far more into that is valuable to me than a simple 'hello world' kind of thing
DaveDev
Thanks! Good luck! I'll try to keep an eye on this if you have further issues, or need any more help.
Alex