From b05d53025cd3055e5cf476881ffda41dc1925ff8 Mon Sep 17 00:00:00 2001 From: MeowcaTheoRange <58280776+MeowcaTheoRange@users.noreply.github.com> Date: Wed, 14 Sep 2022 09:44:56 -0500 Subject: [PATCH 1/5] Use Fetch API --- update.js | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/update.js b/update.js index c90f907..be33758 100644 --- a/update.js +++ b/update.js @@ -5,10 +5,8 @@ setInterval(reqData, 60000); //balls lmao function reqData() { - const XHR = new XMLHttpRequest(); - - XHR.addEventListener("load", (event) => { - var resp = event.target.response; + var donedata = (e) => { + var resp = e; if (event.target.status.toString().includes("40")) { console.log(event.target.status + " error :[") @@ -26,15 +24,11 @@ function reqData() { 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(); \ No newline at end of file From 67cb101abafab7a4f533295de01665869d6ff858 Mon Sep 17 00:00:00 2001 From: MeowcaTheoRange <58280776+MeowcaTheoRange@users.noreply.github.com> Date: Wed, 14 Sep 2022 09:49:02 -0500 Subject: [PATCH 2/5] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 98b7953..2fb064d 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,6 @@ Budda dawg. Dawg with the budda. Put the budda on 'im +Partially done on ee 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)) From 4e6dae6ee300d2a6b7b3d91eaa76ef90d81abf32 Mon Sep 17 00:00:00 2001 From: MeowcaTheoRange <58280776+MeowcaTheoRange@users.noreply.github.com> Date: Thu, 15 Sep 2022 09:22:36 -0500 Subject: [PATCH 3/5] Update update.js --- update.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/update.js b/update.js index be33758..44d5b7a 100644 --- a/update.js +++ b/update.js @@ -8,10 +8,10 @@ function reqData() { var donedata = (e) => { var resp = e; - 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") { @@ -31,4 +31,4 @@ function reqData() { .then(y => donedata(y)); } -reqData(); \ No newline at end of file +reqData(); From fc74cff8ec033dc64b1d7b51513aa90445164424 Mon Sep 17 00:00:00 2001 From: MeowcaTheoRange <58280776+MeowcaTheoRange@users.noreply.github.com> Date: Thu, 15 Sep 2022 09:28:49 -0500 Subject: [PATCH 4/5] Update update.js --- update.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/update.js b/update.js index 44d5b7a..4a46f7c 100644 --- a/update.js +++ b/update.js @@ -18,9 +18,6 @@ function reqData() { localStorage.setItem("commitsha", resp); } else { document.querySelector(".scr-update--").classList.add("open"); - setTimeout(() => { - window.location.href = window.location.href; - }, 15000); localStorage.setItem("commitsha", resp); } } From 95b1e7e587ca410500cd9bcb6658d96b1c4e993b Mon Sep 17 00:00:00 2001 From: MeowcaTheoRange <58280776+MeowcaTheoRange@users.noreply.github.com> Date: Thu, 15 Sep 2022 09:45:50 -0500 Subject: [PATCH 5/5] Fix typo (test commit) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2fb064d..569fa5c 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,6 @@ Budda dawg. Dawg with the budda. Put the budda on 'im -Partially done on ee SMART Board. It was painful. +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))