0xDECAFBAD

It's all spinning wheels and self-doubt until the first pot of coffee.

Magic Microformat Forms Redux, Now with GreaseMonkey!

Update (6/9): One quick note-- I've noticed that this little hack of mine has been called a "hack for Movable Type". However, while I personally use Movable Type, this is a hack for textareas in FireFox.

Movable Type just happens to use textareas. It's worth noting, however, that WordPress uses textareas too. So does LiveJournal. So do most comment posting forms. This is bigger than a single blog package plugin-- that's the point.

Whew. So it looks like the book is out of my hands now, having finished the final reviews. I have some more to say about that, but first I want to post the results of the last day or so of hacking I've done.

I've been working on the stuff for the book so long that I just had to do something else (ie. not RSS or Atom) to help clear my head. But, I'm addicted to learning and building stuff. So, although I did relax a bit since the main effort of the book passed--that is, relax as normal people define it--I just can't stop making things.

So, I had a beer, cracked open Dive Into GreaseMonkey, and decided to make good on that idea I wrote about last month. Not only that, but I had a little free time over lunch today, so I downloaded a trial of Snapz Pro X 2 to try my hand at a little screencasting, ala Jon Udell.

I've got more things to say about all this, and my new found excitement for GreaseMonkey, but first I'll share the goods.

If you want to risk running my horribly premature code on your machine, here's the script:

If you'd like a preview of what it does, here's a movie:

And, just for the sake of completeness, here's a quick screen grab:

shortname=greasemonkey_magic

Archived Comments

  • That's awesome.
  • Very cool. If hCalendar gets popular, Upcoming.org could scrape events off of websites instead of people entering them directly into Upcoming.
  • Nice screencast - didn't realize SnapZ did this. Is there any way to go back and re-edit a form once you have filled it in, or is hacking the hCalendar parser left as an exercise to the reader? (thinking of all of the other things that could be done with this kind of approach!)
  • Sweet.
  • Nice work! [runs off to try it in WP]
  • Congrats on getting the book done Les! Whew!
  • For your next trick, how about a Greasemonkey script to detect hCal and add a link to a vCal file to add it to Apple's calendar program? You know, the one whose name would be one-too-many-lower-case-letter-followed-by-Cal's for this comment.
  • A version that works in GM 0.6.4 would be nice ;)

  • The movie looks cool but the script doesn't work with the actual GM. Too bad, I really want to use that feature.

  • Les ... this is a cool idea, but I've gone to WordPress (fomr their site and from my own server) and LiveJournal test areas and did NOT get the [hcal] to appear. Don't know why ... but it just doesn't seem to work. I hope their's a simple explanation .. like Operator Error! - that can easily get the [hcal] up and running.

    Thanks ..

    les