Removed alert site detection

This commit is contained in:
Thomas G 2022-06-20 16:15:50 +10:00
parent e07defdabb
commit d120fa511a
4 changed files with 1 additions and 54 deletions

18
home.js
View File

@ -84,24 +84,6 @@ window.onload = function() {
} else {
smallbtn5.className = "navbarbutton";
}
var alert = document.getElementById("alert")
var alerttext = document.getElementById("alerttext")
if (window.location.hostname == "") {
alerttext.innerHTML = "You are using this locally.";
alert.className = "";
} else if (window.location.hostname == "thomasluigi07.github.io") {
alerttext.innerHTML = "You are using this on the github pages site.";
alert.className = "";
} else if (window.location.hostname == "MORBLOX.com") {
alerttext.innerHTML = "You are using MORBLOX.com";
alert.className = "";
} else if (window.location.hostname == "morblox.us") {
alerttext.innerHTML = "You are using morblox.us";
alert.className = "";
} else {
alerttext.innerHTML = `You are using an unknown site (${window.location.hostname})`;
alert.className = "";
}
var username = localStorage.getItem("username");
var navbarsignedincontainer = document.getElementById("navbarsignedincontainer");
var navbarusername = document.getElementById("navbarusername");

View File

@ -87,24 +87,6 @@ window.onload = function() {
} else {
smallbtn5.className = "navbarbutton";
}
var alert = document.getElementById("alert")
var alerttext = document.getElementById("alerttext")
if (window.location.hostname == "") {
alerttext.innerHTML = "You are using this locally.";
alert.className = "";
} else if (window.location.hostname == "thomasluigi07.github.io") {
alerttext.innerHTML = "You are using this on the github pages site.";
alert.className = "";
} else if (window.location.hostname == "MORBLOX.com") {
alerttext.innerHTML = "You are using MORBLOX.com";
alert.className = "";
} else if (window.location.hostname == "morblox.us") {
alerttext.innerHTML = "You are using morblox.us";
alert.className = "";
} else {
alerttext.innerHTML = `You are using an unknown site (${window.location.hostname})`;
alert.className = "";
}
var usernamecontainer = document.getElementById("UsernameContainer");
var username = localStorage.getItem("username");
var navbarsignedincontainer = document.getElementById("navbarsignedincontainer");

View File

@ -95,6 +95,7 @@ body {
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
margin-bottom: 35px;
padding-bottom: 0px;
}
.content {

18
main.js
View File

@ -75,24 +75,6 @@ window.onload = function() {
} else {
smallbtn5.className = "navbarbutton";
}
var alert = document.getElementById("alert")
var alerttext = document.getElementById("alerttext")
if (window.location.hostname == "") {
alerttext.innerHTML = "You are using this locally.";
alert.className = "";
} else if (window.location.hostname == "thomasluigi07.github.io") {
alerttext.innerHTML = "You are using this on the github pages site.";
alert.className = "";
} else if (window.location.hostname == "MORBLOX.com") {
alerttext.innerHTML = "You are using MORBLOX.com";
alert.className = "";
} else if (window.location.hostname == "morblox.us") {
alerttext.innerHTML = "You are using morblox.us";
alert.className = "";
} else {
alerttext.innerHTML = `You are using an unknown site (${window.location.hostname})`;
alert.className = "";
}
var username = localStorage.getItem("username");
var navbarsignedincontainer = document.getElementById("navbarsignedincontainer");
var navbarusername = document.getElementById("navbarusername");