Created
March 5, 2024 23:46
-
-
Save PatheticMustan/e45382134b4de1717f911a638c2b8d82 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const items = document.getElementsByClassName("mobile-items")[0]; | |
function match(a, b) { | |
items.children[a].firstChild.click(); | |
items.children[b].firstChild.click(); | |
} | |
function matchAllTo(a) { | |
queue = queue.concat(new Array(items.children.length).fill(0).map((v, i) => [a, i])); | |
} | |
let queue = []; | |
let interval = setInterval(() => { | |
if (queue.length > 0) { | |
const item = queue.shift(); | |
match(item[0], item[1]); | |
} | |
}, 200); | |
let i=0; | |
// to do crazy matching, do | |
matchAllTo(i++) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment