Reputation: 29658
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.
Upvotes: 3
Views: 679
Reputation: 16518
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.
Upvotes: 4
Reputation: 93473
The easiest way is just to install Tampermonkey. It will allow you to run most GM scripts, as-is, on Chrome.
Upvotes: 2
Reputation: 105220
Firefox: as usual
Chrome: http://www.techrena.net/internet/enable-greasemonkey-user-scripts-google-chrome-easily/
Opera: http://www.opera.com/docs/userjs/examples/#greasemonkey
Upvotes: 1