Nathanwoodburn.github.io/templates/assets/js/redirect.js

7 lines
236 B
JavaScript
Raw Normal View History

2023-02-13 20:14:50 +11:00
if (window.location.hostname != document.currentScript.getAttribute('domain')){
window.location.href = "http://" + document.currentScript.getAttribute('domain') + window.location.pathname;
}
else{
console.log("Already Redirected");
}