Create redirect.js

This commit is contained in:
Nathan Woodburn
2022-02-03 22:04:17 +11:00
parent bc7e41322d
commit 61bc95ede5

6
redirect.js Normal file
View File

@@ -0,0 +1,6 @@
if (window.location.hostname != document.currentScript.getAttribute('domain')){
window.location.href = "http://" + document.currentScript.getAttribute('domain') + window.location.pathname;
}
else{
console.log("Already Redirected");
}