Created
December 27, 2021 02:41
-
-
Save SamuelDavis/6e52cb935a500acd268edea4d3dc6309 to your computer and use it in GitHub Desktop.
Programmatically remove the content shield from Twitter.
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
(function () { | |
const timeout = 5000; | |
const start = performance.now(); | |
const interval = setInterval(() => { | |
const popup = document.querySelector('[data-testid="sheetDialog"] svg'); | |
console.log(popup); | |
if (!popup || performance.now() - start > timeout) | |
return clearInterval(interval); | |
if (popup) popup.parentElement.click(); | |
}, 100); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment