made link to published site more noticable, and removed unnessasary code from index.js as that only loads on 1 page.

This commit is contained in:
Thomas G 2022-06-20 12:47:29 +10:00
parent f2934acb8d
commit 41b4cf9170
2 changed files with 1 additions and 25 deletions

View File

@ -47,7 +47,7 @@
<h1>WELCOME TO MORBLOX!!!</h1>
<p>MORBLOX is a new revival of ROBLOX.</p>
<p><a href="signup.html">Sign Up</a> or <a href="login.html">Log In</a>
<p id="morblox" class="invisible"><a href="https://morblox.us">Click Here</a> to go to the published site.</p>
<p id="morblox" class=""><a href="https://morblox.us">Click Here</a> to go to the published site.</p>
</div>
<footer>
<a href="privacy.html">Privacy Policy</a>

View File

@ -1,38 +1,14 @@
window.addEventListener('resize', function() {
var logo_full = document.getElementById("logo_full")
var logo_small = document.getElementById("logo_small")
var viewport_width = window.innerWidth;
if (viewport_width < 900) {
logo_full.className = "invisible";
logo_small.className = "";
} else {
logo_small.className = "invisible";
logo_full.className = "";
}
});
window.onload = function() {
var alert = document.getElementById("alert")
var alerttext = document.getElementById("alerttext")
var morblox = document.getElementById("morblox")
if (window.location.hostname == "") {
alerttext.innerHTML = "You are using this locally.";
alert.className = "";
morblox.className = "";
} else if (window.location.hostname == "thomasluigi07.github.io") {
alerttext.innerHTML = "You are using this on the github pages site.";
alert.className = "";
morblox.className = "";
} else if (window.location.hostname == "MORBLOX.com") {
alerttext.innerHTML = "You are using MORBLOX.com";
alert.className = "";
morblox.className = "";
} else if (window.location.hostname == "morblox.us") {
alerttext.innerHTML = "You are using morblox.us";
alert.className = "";
morblox.className = "invisible";
} else {
alerttext.innerHTML = `You are using an unknown site (${window.location.hostname})`;
alert.className = "";
morblox.className = "";
}
};