Thursday, June 09, 2005

Greasemonkey scripts for Greasemonkey scripts

It turns out that you can in fact modify a document that contains nothing but a javascript file. So if you set the @include directive to *user.js and do something like

var href = "http://www.example.com/stuff?" + getDataUri( document.documentElement.innerHTML ); document.documentElement.appendChild( aLinkUsingThatHref )

, you'd be ready to redistribute your own scripts. It even seems to work for Platypus generated scripts, despite the fact that the URL isn't in the form scriptname.user.js.

No comments: