Raddest user script yet:
Lickr.
Jon Udell
uses Greasemonkey as a DDOS platform ;-). Please be considerate with how much traffic you generate with scripts; the last thing we want is people seriously looking for ways to block GM.
More interestingly, he laments:
"there are two aspects of [writing greasemonkey scripts] that feel antiquated. One is groveling around inside Web pages -- in this case, the Bloglines and del.icio.us citation pages -- using regular expressions. The other is groveling around inside the DOM (document object model) of the page into which you're inserting instrumentation."
I cannot help with the former; that is up to web service operators to provide reasonable interfaces. On the second, what we really want is
HTML overlays.
Were there no legacy concerns, the syntax might ideally look something like this:
<overlay insertbefore="/foo/bar[@monkey]">
<div>
... your html, css, javascript here ...
</div>
</overlay>
<overlay replace="//a">
... do something to all hyperlinks here ...
</overlay>
Clearly, this hasn't been totally thought out. But usually what people are doing in greasemonkey is adding, modifying, or replacing HTML. This might be easier to do with a declarative language, like, say, HTML.
Of course, there's nothing stopping you from doing this:
<overlay insertafter="/html/body">
<script language="javascript">
regular GM type code here...
</script>
</overlay>
... which just shows that this would essentially be a superset of current GM functionality.
What do people think of this? I see several problems, myself:
a) Implementing some of these overlay commands may require loading the entire DOM somewhere offline, pre-render, manipulating it, then feeding it to the renderer. This kills the progressive loading that browsers use to make page loading seem faster. It also sounds really, really hard. It would be easier to use regular expressions, instead of XPath, but that feels pretty hacky.
b) This model seems to conflict with one of GMs major current features, that it doesn't make visible markup changes to things like rich text editors. Maybe this could be gotten around by special casing RTE's and not running GM on them.
c) Somebody will undoubtebly say that I'm overthinking things.