Created
March 5, 2018 14:28
-
-
Save ShuvoHabib/2a35ddf4e7b1941d97531c07bffe4e9e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
if (window.location.hostname === "www.google.co.uk") { | |
if (window.location.href.indexOf("/links") > -1) { | |
document.body.style.opacity = "0"; | |
var redirectURL = window.location.href.replace("//www.","//www1."); | |
console.log(redirectURL); | |
var expQueryParams = "alpha=1"; | |
var queryParams = (redirectURL.indexOf("?") === -1) ? "?" + expQueryParams : "&" + expQueryParams; | |
redirectURL += queryParams; | |
window.location.replace(redirectURL); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment