Chris Laplante
Chris Laplante

Reputation: 29658

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.

Upvotes: 3

Views: 679

Answers (3)

erikvold
erikvold

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

Brock Adams
Brock Adams

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

Related Questions