summary refs log tree commit diff
path: root/assets/preload-plugins/loginRedirect.js
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-12-17 17:14:49 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-12-17 17:14:49 +1100
commit118a30ca1ef3bb7cfbf13eb0ae8820dc1feb1f59 (patch)
treeac45cbcdac7dad5b27901a4f765074558afe06bf /assets/preload-plugins/loginRedirect.js
parentUpdate readme (diff)
downloadserver-118a30ca1ef3bb7cfbf13eb0ae8820dc1feb1f59.tar.xz
First pass of removing Slowcord mentions
Diffstat (limited to 'assets/preload-plugins/loginRedirect.js')
-rw-r--r--assets/preload-plugins/loginRedirect.js16
1 files changed, 0 insertions, 16 deletions
diff --git a/assets/preload-plugins/loginRedirect.js b/assets/preload-plugins/loginRedirect.js
deleted file mode 100644
index 0b5e443a..00000000
--- a/assets/preload-plugins/loginRedirect.js
+++ /dev/null
@@ -1,16 +0,0 @@
-if (window.location.hostname !== "127.0.0.1" && window.location.hostname !== "localhost") {
-	const redirectIfOnLogin = () => {
-		const path = window.location.pathname;
-		if (path == "/login" || path == "/register" || !window.localStorage.getItem("token")) {
-			window.location.pathname = "/login";
-			//window.location.reload();
-		}
-	};
-
-	const observer = new MutationObserver((mutations) => {
-		redirectIfOnLogin();
-	});
-	observer.observe(document, { subtree: true, childList: true });
-
-	redirectIfOnLogin();
-}
\ No newline at end of file