Skip to content

Instantly share code, notes, and snippets.

@SamuelDavis
Created December 27, 2021 02:41
Show Gist options
  • Save SamuelDavis/6e52cb935a500acd268edea4d3dc6309 to your computer and use it in GitHub Desktop.
Save SamuelDavis/6e52cb935a500acd268edea4d3dc6309 to your computer and use it in GitHub Desktop.
Programmatically remove the content shield from Twitter.
(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