Skip to content

Instantly share code, notes, and snippets.

@tuanchauict
Created April 21, 2025 04:46
Show Gist options
  • Save tuanchauict/2e8efb084ab6ff6d4baca61509474067 to your computer and use it in GitHub Desktop.
Save tuanchauict/2e8efb084ab6ff6d4baca61509474067 to your computer and use it in GitHub Desktop.
Auto click Block on Threads
function autoClickBlock() {
const dialogBody = document.evaluate(
`//*[contains(text(), "won't be able to find your profile")]`,
document,
null,
XPathResult.FIRST_ORDERED_NODE_TYPE,
null
).singleNodeValue;
if (!dialogBody) {
return;
}
const actionContainer = dialogBody.parentElement.nextElementSibling;
actionContainer.querySelector('span').click();
}
setInterval(autoClickBlock, 500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment