Last active
September 17, 2021 17:40
-
-
Save konecnyna/9141b38578d5f1faadc69a8c6bcc04f0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 fun = ` | |
(async () => { | |
const sleep = (timeout) => new Promise((resolve) => setTimeout(resolve, timeout)); | |
const btns = [...document.getElementsByClassName("btn")].filter( it => it.title === "Add to Card"); | |
for (let i = 0; i < btns.length; i++) { | |
btns[i].click(); | |
await sleep(1000); | |
} | |
})() | |
`; | |
console.log(`javascript: {${fun.replace(/\n+/g, '')}}; void (0);`) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment