Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ShuvoHabib/2a35ddf4e7b1941d97531c07bffe4e9e to your computer and use it in GitHub Desktop.
Save ShuvoHabib/2a35ddf4e7b1941d97531c07bffe4e9e to your computer and use it in GitHub Desktop.
(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