Skip to content

Instantly share code, notes, and snippets.

@RFS-ADRENO
Created November 12, 2024 03:20
Show Gist options
  • Select an option

  • Save RFS-ADRENO/e028d6b951ac41c24471f069343cc861 to your computer and use it in GitHub Desktop.

Select an option

Save RFS-ADRENO/e028d6b951ac41c24471f069343cc861 to your computer and use it in GitHub Desktop.
const container = document.querySelector(".xamitd3.x1sy10c2.xieb3on.x193iq5w.xrljuej.x1aody8q");
function main(i = 0) {
if (i == 20) {
console.log("Nghỉ ngơi 2s");
return setTimeout(main, 2000)
}
setTimeout(() => {
const decline = document.querySelector("[aria-label=\"Từ chối\"]") || document.querySelector("[aria-label=\"Decline\"]");
if (decline) {
decline.click();
console.log("ĐÃ TỪ CHỐI");
main(i + 1)
} else if (container != null) {
window.scrollBy(0, container.clientHeight);
console.log("KÉO XUỐNG ĐỂ LOAD THÊM");
setTimeout(() => main(i + 1), 1000);
} else {
console.log("KẾT THÚC");
}
}, 500)
}
main();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment