[Greasemonkey] Convert links to TinyURLs

Brendan J verifex at gmail.com
Fri Aug 25 01:20:04 EDT 2006


Hello,

I threw this thing together today as thought it would be useful for getting
TinyURLs from links without having to leave the page.  Any comments are
welcome.

http://userscripts.org/scripts/show/5314

Also, I was wondering if there was a cleaner way of achieving this same
result?  Creating an element to store the ID of the link to be converted so
the GM_xmlhttpRequest function can find the unique URL seems really messy,
but I couldn't think of another way to reference the calling element.  Is
there a DOM way to walk to the URL in question?  Or is there a way to pass
variables through these functions?  Or is there some other method I'm
missing?

Thanks,

Brendan Crosser-McGay


More information about the Greasemonkey mailing list