Fix card drawing

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

View File

@ -53,7 +53,15 @@ await fetch("https://code.jquery.com/jquery-3.6.0.min.js").then(x => x.text()).t
} }
// Click the spin button // Click the spin button
function spin() { function spin() {
clickFirstButtonByClassName("wheel__main--note") 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 // Close the dialog
function closeSwal2() { function closeSwal2() {