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
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))

View file

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