如何创建浏览器插件? [英] How to create a browser plug in?
问题描述
我必须创建一个插件,当用户将鼠标悬停在某些条件上时,该插件必须显示信息。有谁能告诉我如何做的方向?
I have to create a plug-in that will have to display information when user hovers over certain terms. Can anyone show me the direction how to do it?
我对创建插件没有太多想法。我知道我想做什么可以通过java脚本完成。但是可以将java脚本文件作为浏览器插件安装吗?对此有任何想法将不胜感激!谢谢!
I do not have much ideas about creating plug-ins. I know what i want to do can be done by java script. But can a java script file be installed as a browser plug in? any ideas on this will be appreciated! Thanks!
推荐答案
你想要做的是创建一个 userscript 。这正是你所描述的:一段javascript代码作为插件安装在浏览器中。
What you want to do is create a userscript. It's exactly what you're describing: a piece of javascript code installed in the browser as a plugin.
支持用户脚本:
- Firefox使用 Greasemonkey
- 通过IE 使用自己的Greasemonkey版本
- Google Chrome本地(很快)
- Opera本地化
- 甚至通过 Safari
- By Firefox using Greasemonkey
- By IE with its own version of Greasemonkey
- Natively (soon) by Google Chrome
- Natively by Opera
- And even by Safari
所以几乎每个主要浏览器都支持。
So support is on almost every major browser.
用户脚本是您尝试的最简单的解决方案o do。
A userscript is the easiest solution for what you're trying to do.
这篇关于如何创建浏览器插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!