开发者

How to write cross-browser compatible userscripts?

开发者 https://www.devze.com 2022-12-08 13:24 出处:网络
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 diff

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

精彩评论

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