First pass of removing Slowcord mentions

This commit is contained in:
Madeline
2022-12-17 17:14:49 +11:00
parent be818cadd5
commit 118a30ca1e
21 changed files with 168 additions and 515 deletions
-16
View File
@@ -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();
}