diff --git a/lib/public/javascript/mojang.js b/lib/public/javascript/mojang.js
index 2cad271..e1aa4cf 100644
--- a/lib/public/javascript/mojang.js
+++ b/lib/public/javascript/mojang.js
@@ -14,15 +14,23 @@ xhr.onload = function() {
var error = null;
if (textures || session && skins) {
- error = "both";
+ error = "all";
} else if (skins) {
- error = "name";
+ error = "username";
} else if (session) {
- error = "uuid";
+ error = "UUID";
}
- console.log(error);
+ if (error) {
+ var warn = document.createElement("div");
+ warn.setAttribute("class", "alert alert-warning");
+ warn.setAttribute("role", "alert");
+ warn.innerHTML = "
Mojang issues
Mojang's servers are having trouble right now, this affects " + error + " requests at Crafatar. check status";
+ document.querySelector("#alerts").appendChild(warn);
+ }
};
-xhr.open("GET", "https://status.mojang.com/check", true);
-xhr.send();
\ No newline at end of file
+document.addEventListener("DOMContentLoaded", function(event) {
+ xhr.open("GET", "https://status.mojang.com/check", true);
+ xhr.send();
+});
\ No newline at end of file
diff --git a/lib/views/index.html.ejs b/lib/views/index.html.ejs
index 55f06bb..2cc9cf5 100644
--- a/lib/views/index.html.ejs
+++ b/lib/views/index.html.ejs
@@ -17,6 +17,7 @@
+
@@ -53,11 +54,13 @@
-
-
Usernames are deprecated!
- You should only use usernames for
testing.
- Updates are slower, some features are not available, and it may
break anytime!
-
We strongly advise you to use UUIDs instead of usernames. more info
+
+
+
Usernames are deprecated!
+ You should only use usernames for
testing.
+ Updates are slower, some features are not available, and it may
break anytime!
+
We strongly advise you to use UUIDs instead of usernames. more info
+
Documentation