Search code examples
javascriptgoogle-chromecross-browsergreasemonkeyuserscripts

Any tips for writing cross-browser Greasemonkey userscripts?


I have a few scripts that clean-up some of the sites I use. But, I have now switched over to Chrome from Firefox and some of the scripts don't work, even though I can install them.

Can anyone offer any tips on how to write Userscripts that work (nearly) cross-browser? Specifically, Firefox and Chrome, and maybe Opera.


Solution

  • I've been working on a User Script engine comparison table which should help you know which GM_APIs you can depend on.

    Other then that you need to write cross browser JavaScript which is a long topic; I would recommend the DOM compatibility tables offered by QuirksMode for cross browser DOM usage.