Skip to content

Instantly share code, notes, and snippets.

@tdsmith
Created March 31, 2012 17:13
Show Gist options
  • Save tdsmith/2266841 to your computer and use it in GitHub Desktop.
Save tdsmith/2266841 to your computer and use it in GitHub Desktop.
UC Irvine library proxy bookmarklet
javascript:(function(){l=document.location;rot13=function(str){return str.replace(/[a-zA-Z]/g,function(c){return String.fromCharCode((c<='Z'?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);});};url='https://vpn.nacs.uci.edu/+CSCO+'+'00'+rot13(l.protocol+'//'+l.host).replace(/[\s\S]/g,function(s){return parseInt(s.charCodeAt()).toString(16);})+'++'+l.pathname+l.search+l.hash;window.location.href=url;})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment