I'll trade you a proxy for a doxy! (Er, or not.)
March 12, 2006 11:25 PM   Subscribe

Help me make a bookmarklet for a proxy server - now doesn't that sound like fun!

Here's the problem: I usually use a nice automatic proxy server, configured in firefox, through my university. Sometimes that doesn't work for a particular page, and I use another. But to do that, I actually have to type something - an unacceptable level of service, frankly - and I'd like to put a stop to that.

Thus, a bookmarklet. All it has to do is take a web address: realaddress.com/blah/blah.html
and turn it into: realaddress.com.proxyaddress.com/blah/blah.html

Do-able? I think so, but I don't know how. I assume that a javascript similar to :

<SCRIPT LANGUAGE="JavaScript"<
window.location="http://www.yourdomain.com/";
</script>

... should do the trick, but I'm not sure how to parse the original URL and insert my proxy address. And this would be easily save-able as a bookmarklet. Any hints?

Also, why does mefi replace the ampersands and whatnot with their ascii in the text box? That doesn't seem.. um.. helpful..
posted by metaculpa to Computers & Internet (2 answers total)
 
Response by poster: Also, thanks in advance for your help!
posted by metaculpa at 11:38 PM on March 12, 2006


There's some filtering going on here at metafilter so I can't make a hyperlink but bookmark this,

javascript:window.location = "http://" + window.location.hostname + ".proxyaddress.com" + window.location.pathname + window.location.search

I seem to remember that the location object is different in IE. This does work in Firefox though.

Metafilter should reencode "&" as "&amp;" in textboxes but it doesn't. It only reencodes "&gt;" and a few other entities.

ps. HEY MATT WANT TO MOVE TO PHP/POSTGRES? CALL ME HONEY!
posted by holloway at 12:40 AM on March 13, 2006


« Older How would one go about legally obtaining a real...   |   They don't exactly teach this in Sunday School Newer »
This thread is closed to new comments.