Further quick thoughts on GreaseMonkey
Now for some quick GreaseMonkey spew, recorded without any effort to actually see what's up in the community or reading any FAQs:
- I want to separate script code into reusable modules.
- That said, am I an Architecture Astronaut when I can't get more than 10 minutes into a quick project without already starting to digress into building a reusable framework?
- Is it wrong that I felt like I was working in Perl again when I wrote that script?
- That said, I wish JavaScript had either multi-line quotes ala Python or Perl heredoc syntax.
- Doing some twisty regex search-and-replace in Vi lets you do a lot of refactoring / recoding damage to source code in no time flat.
- Can I just say how nice it is to not worry about other browsers when coding?
I've also got a few ideas I'd like to record and pursue for future GreaseMonkey endeavors:
- Record the URL of all form submissions via XMLHTTPRequest to a remote server, with blog comment forms in mind. Track changes on those URLs. Notify me via Atom feed when new comments arrive in places where I posted comments.
- Clean up and abstract that magic form thing I did into a more general way to make all kinds of magic textarea forms. (More microformats? .sig files for LiveJournal responses? /usr/bin/banner for annoying blog comments?)
- Revive Third Voice in GreaseMonkey style. Subscribe to arbitrary REST API'ed annotation servers, fetch & aggregate annotations for current URL via XMLHTTPRequest, build cute floating stickies with rude comments from friends.
- Auto-ROT13 en/decoder ring, because there's a need for that.
- Script which redirects all links to books on Amazon.com to point at my new book. I will install this on all computers at CompUSA and the Apple Store.
I've suddenly realized that a lot of the things I wanted to do with Agent Frank are possible with GreaseMonkey. Also, I wonder how long it'll be before I get sucked into further FireFox extension hacking.
shortname=further_greasemonkey
Archived Comments
Also, if you want dependency management, you're likely to have better luck creating an extension, like jslib (http://jslib.mozdev.org/ ).
On Third Voice bit, Simon Willison and Aaron Boodman are both tinkering in this area.
On decoder ring, you mean where 2 users would share a key, or do u mean persisting encoded values?
On book redirect... too evil. ;)
As for the decoder ring, I was really just thinking of something silly with ROT13 for spoilers to movies & etc... but a shared key secret spy ring would be nifty.
That is big stuff right there. I've seen a few other posts by other people since that one was written which indicate that there's motion. Not much of it seems visible yet though.
It's like the moral way to experience that thrill.
Plus, it's simpler than an Extension (never underestimate the major impact of making something slightly easier) and you get to apply it to someone else's site.
Extensions, though, you're really single browser (or slightly more, if you support Seamonkey too), and with chrome privileges you can do whatever you want.
Of course, do it where it makes sense and isn't painful...