[Greasemonkey] Examing http response codes

Matt Katz snarkhunt at gmail.com
Mon Dec 19 19:44:09 EST 2005


I'm trying to do one of the ideas listed on userscripts.org.  Some human
hates tinyurls and wants to see the original url.  Sounds reasonable.
The way tinyurl works <http://www.oreillynet.com/pub/wlg/3946> is that when
you do a get it tinyulr.com returns a 302 code with info on where to get the
real data, which your browser follows to the eventual home.

So far I haven't been able to sniff out that 302 response in a
GM_httpRequest.

The good news is that tinyurl allows you to set a cookie for previews.  If
you've got that cookie, a get to tinyurl will pull back a preview page which
I can parse for the original url.  Once I've got that I can go change the
link on the page.

I'd really like to avoid forcing users of this script to set this cookie.
Is there any way you wizards can think of to grab the info off of the 302
response or is that below the level that GM has access to?


--

My blog is exciting and fast paced like today's world!
http://snarkhunt.blogspot.com


More information about the Greasemonkey mailing list