This commit is contained in:
MeowcaTheoRange 2022-09-15 10:26:57 -05:00
commit 073fe8d92a
2 changed files with 17 additions and 17 deletions

View file

@ -2,4 +2,6 @@
Budda dawg. Dawg with the budda. Put the budda on 'im Budda dawg. Dawg with the budda. Put the budda on 'im
Partially done on a SMART Board. It was painful.
[jqtp.js](/jqtp.js) courtesy of [furf](https://github.com/furf) ([JQuery Touch Punch](https://github.com/furf/jquery-ui-touch-punch)) [jqtp.js](/jqtp.js) courtesy of [furf](https://github.com/furf) ([JQuery Touch Punch](https://github.com/furf/jquery-ui-touch-punch))

View file

@ -5,33 +5,31 @@ setInterval(reqData, 60000);
//balls lmao //balls lmao
function reqData() { function reqData() {
const XHR = new XMLHttpRequest(); var donedata = (e) => {
var resp = e;
XHR.addEventListener("load", (event) => { // if (event.target.status.toString().includes("40")) {
var resp = event.target.response; // console.log(event.target.status + " error :[")
// return;
if (event.target.status.toString().includes("40")) { // }
console.log(event.target.status + " error :[")
return;
}
if (resp != prevSha) { if (resp != prevSha) {
if (prevSha == "ThisShouldntBeASHA") { if (prevSha == "ThisShouldntBeASHA") {
localStorage.setItem("commitsha", resp); localStorage.setItem("commitsha", resp);
} else { } else {
<<<<<<< HEAD
document.querySelector("#updatedialog").classList.add("open"); document.querySelector("#updatedialog").classList.add("open");
=======
document.querySelector(".scr-update--").classList.add("open");
>>>>>>> 95b1e7e587ca410500cd9bcb6658d96b1c4e993b
localStorage.setItem("commitsha", resp); localStorage.setItem("commitsha", resp);
} }
} }
}); };
XHR.addEventListener("error", (event) => { fetch("https://ClockCheckGithub.meowcatheorange.repl.co")
console.log('Oops! Something went wrong.'); .then(x => x.text())
}); .then(y => donedata(y));
XHR.open("GET", "https://ClockCheckGithub.meowcatheorange.repl.co");
XHR.send();
} }
reqData(); reqData();