开发者

How to make a site-lookup addon for Firefox?

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 ex开发者_StackOverflow中文版ample into what I need. Thanks.


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

C:\Users\YourUserName\AppData\Roaming\Mozilla\Firefox\Profiles\xxxxxxxx.default\extensions\something@wikipedia.com\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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜