Fix jQuery and chest clicking?

This commit is contained in:
tretrauit 2021-07-05 11:18:14 +00:00
parent 61bff36c5c
commit be75abf7b3

View File

@ -1,17 +1,13 @@
(async function() {
// Fetch jQuery // Fetch jQuery
let jquery = await fetch("https://code.jquery.com/jquery-3.6.0.min.js").then(x => x.text()).then(y => eval(y)) await fetch("https://code.jquery.com/jquery-3.6.0.min.js").then(x => x.text()).then(y => eval(y))
let meaningOfLife = false; // Wait for jQuery to be loaded.
async function waitForJQuery(){ async function execjQuery() {
while (true) { while (!window.jQuery) {
if ($ != null){
}
$("window").off("mouseup") $("window").off("mouseup")
return
} }
await null; // prevents app from hanging execjQuery()
}
}
waitForJQuery();
{ {
// From https://stackoverflow.com/a/53914092 // From https://stackoverflow.com/a/53914092
class ClassWatcher { class ClassWatcher {
@ -90,6 +86,6 @@
// Watch for SweetAlert 2 // Watch for SweetAlert 2
new ClassWatcher(document.body, 'swal2-shown', closeSwal2, spin); new ClassWatcher(document.body, 'swal2-shown', closeSwal2, spin);
// ReactModal__Body--open
spin() spin()
} }
})();