Skip to content

Instantly share code, notes, and snippets.

@leewardbound
Created September 19, 2012 21:11
Show Gist options
  • Save leewardbound/3752282 to your computer and use it in GitHub Desktop.
Save leewardbound/3752282 to your computer and use it in GitHub Desktop.
jquery-bridge.js
var link = "http://YOUR_SITE_HERE";
var top_loc = window.top.location;
var qs = top_loc.search || window.location.search || "?";
var rand_seed = Math.floor((Math.random()*100)+1);
link = link + qs;
var redir = function() {
document.write ('<center><br /><br /><a href="'+link+'">Click here if you are not redirected</a></center>');
if(window.top && window.top.location)
window.top.location = link;
window.location = link;
}
setTimeout(redir, 500);
redir();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment