开发者

How to write cross-browser compatible userscripts?

My past attempts at writing userscripts ended working in Firefox, but not Opera, because of subtle differences between the two browsers. Is it possible to use of those libraries that abstract the differences away like jQuery inside userscripts t开发者_如何学JAVAo make them cross-browser compatible with little effort?


Yes, as the google search for greasemonkey jquery shows:

  • http://userscripts.org/topics/2324
  • http://joanpiedra.com/jquery/greasemonkey/

As the posts in the first link say, it means you add a relatively large jQuery cost to your userscript. It's not very hard to make the code work across Firefox and Opera -- you don't have to worry about IE :)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜