Last active
November 12, 2024 01:14
-
-
Save RFS-ADRENO/8f6a0bc76fb347725a030b3babefd1ef 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
| let selectAll = document.querySelector("[aria-label=\"Select all\"]") || document.querySelector("[aria-label=\"Chọn tất cả\"]"); | |
| let decline = document.querySelector("[aria-label=\"Decline\"]") || document.querySelector("[aria-label=\"Từ chối\"]"); | |
| let getDone = () => document.querySelector("[aria-label=\"Done\"]") || document.querySelector("[aria-label=\"Xong\"]"); | |
| let postContainer = document.querySelector(".xamitd3.xw7yly9.x193iq5w.x1xfsgkm.xqmdsaz.xvue9z.xq1tmr.x1ceravr"); | |
| let sleep = (ms) => new Promise(res => setTimeout(res, ms)); | |
| async function main() { | |
| if (!selectAll || !decline) return; | |
| if (getDone() != null || selectAll.getAttribute("aria-disabled") == "true") { | |
| await sleep(500); | |
| return main(); | |
| } | |
| for (let i = 0; i < 5; i++) { | |
| scroll(); | |
| await sleep(1000); | |
| } | |
| selectAll.click(); | |
| await sleep(500); | |
| decline.click(); | |
| await sleep(500); | |
| getDone().click(); | |
| main(); | |
| } | |
| function scroll() { | |
| window.scrollBy(0,postContainer.clientHeight); | |
| } | |
| main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment