13

I'd like to find a Firefox addon that would look at the url you're viewing, match it against a pattern, and if there was a match it would execute arbitrary Javascript (maybe by loading the .js file from another url).

I can't seem to find any such thing, but it must exist. Anyone seen something like this?

ccleve
  • 15,239
  • 27
  • 91
  • 157

1 Answers1

18

Check out GreaseMonkey:

https://addons.mozilla.org/en-US/firefox/addon/748/

Josh
  • 12,448
  • 10
  • 74
  • 118
  • 1
    GreaseMonkey i exactly what you're after BUT there's a couple of gotchas that you should be aware of - Most importantly that you don't get access to the raw DOM but the the `XPCNativeWrappers` which behave in _almost_ the same way... see http://www.oreillynet.com/pub/a/network/2005/11/01/avoid-common-greasemonkey-pitfalls.html – Basic Dec 17 '10 at 23:30
  • @T.J. Crowder: That wasn't sarcasm, etc. I had used it once before, a long time ago, and sincerely couldn't remember if that was what it exactly did, on a per page basis. – Josh Dec 17 '10 at 23:32
  • I don't think GreaseMonkey is being maintained anymore. Couldn't even find a script after creating one. This answer needs to be updated. – Nav Jul 25 '23 at 07:39