Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var ref = document.referrer;
- var siteurl = window.location.href;
- if (document.referrer.indexOf("google") > 0){
- if (ref.indexOf(siteurl)!= -1){
- }
- else{
- (function(window, location) {
- history.replaceState(null, document.title, location.pathname+"#!/auth");
- history.pushState(null, document.title, location.pathname);
- window.addEventListener("popstate", function() {
- if(location.hash === "#!/auth") {
- history.replaceState(null, document.title, location.pathname);
- setTimeout(function(){
- window.location.href = window.location.protocol + "//" + window.location.hostname + "/random";
- },0);
- }
- }, false);
- }(window, location));
- }
- }
Add Comment
Please, Sign In to add comment