I'll trade you a proxy for a doxy! (Er, or not.)
March 12, 2006 11:25 PM   RSS feed for this thread 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 comments total)
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...   |   Do Christians (specifically Ba... Newer »

You are not logged in, either login or create an account to post comments



Related Questions
stop scrolling, damn ye! May 2, 2007
Mark CF, if you're reading this, shoo! January 23, 2007
RedirectFilter: Can't edit meta or serverside... August 31, 2006
JavaScript only RSS parser? June 17, 2005
DHTML-ish function question... April 13, 2005