From 61bc95ede53b0dc0217b909a474708b6c6533fe2 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Thu, 3 Feb 2022 22:04:17 +1100 Subject: [PATCH] Create redirect.js --- redirect.js | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 redirect.js diff --git a/redirect.js b/redirect.js new file mode 100644 index 0000000..5bccd61 --- /dev/null +++ b/redirect.js @@ -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"); +} \ No newline at end of file