Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox Extension vs. Greasemonkey Script? [closed]

I've been working on a Firefox extension, but it's been slow going (in part because I have no time to work on it). I've got a basic skeleton, verified that I can talk to an external JSON API, modify any webpage when loaded, and show a preferences box. These are all necessary Hello Worlds for the extension I am writing (maybe I don't need the preferences box).

Suddenly it occurred to me that I may be ignoring a much easier way to do it. Since Greasmonkey scripts may be compiled into Firefox Extensions, Greasemonkey might be a better way to go:

  1. It could be easier (not sure)?
  2. It could be cross-browser (at least Safari and Firefox)?
  3. Are there limits to Greasemonkey scripts vs. 'native' FF extensions? Can chrome UIs be written? Normal DIVs be popped up? Preferences be stored (I think they can be)?

I'm looking for a comparison of Greasemonkey versus "native" Firefox extensions. Also, has anyone worked with "compiling" a Greasemonkey script into an FF extension (experiences, problems)?

like image 958
Dan Rosenstark Avatar asked Dec 01 '09 18:12

Dan Rosenstark


2 Answers

I would say, in general, if your purpose is to modify the way a webpage is displayed/functions, then Greasemonkey is the way to go. If you have a bunch of window/UI to display and you are really going beyond the core intention of Greasemonkey then it's probably best to stick with a more traditional extension.

like image 196
philfreo Avatar answered Nov 04 '22 05:11

philfreo


One think greasemonkey scripts can't invoke UniversalXPConnect. I run into some problems due to this, not sure whether this can be solved with a Firefox extension. But I feel pretty much constrained as not able to call the UniversalXPConnect and do something big.

like image 31
Priyank Bolia Avatar answered Nov 04 '22 04:11

Priyank Bolia