Fix card drawing

This commit is contained in:
tretrauit 2021-07-03 21:24:24 +00:00
parent 482114e66c
commit c44116eee5

View File

@ -53,8 +53,16 @@ await fetch("https://code.jquery.com/jquery-3.6.0.min.js").then(x => x.text()).t
}
// Click the spin button
function spin() {
if (document.getElementsByClassName("popup-draw__card").length > 0) {
let teams = document.getElementsByClassName("popup-draw__card")
for (let i = 0; i < 3; i++) {
teams[i].dispatchEvent(new MouseEvent("click"));
}
}
else {
clickFirstButtonByClassName("wheel__main--note")
}
}
// Close the dialog
function closeSwal2() {
clickFirstButtonByClassName("swal2-close")