Created
January 4, 2020 21:36
-
-
Save wesinator/c7b4379e4c647d975531792849d30239 to your computer and use it in GitHub Desktop.
Prevent sensitive media from being opened on 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
// ==UserScript== | |
// @name Twitter sensitive media blocker | |
// @version 1 | |
// @grant none | |
// @match https://twitter.com/* | |
// @run-at document-idle | |
// ==/UserScript== | |
function blockTwitterSensitiveMedia() { | |
var blockedMedia = document.getElementsByClassName("Tombstone-action"); | |
for (var media in blockedMedia) { | |
console.log(blockedMedia[media]); | |
blockedMedia[media].hidden = true; | |
} | |
} | |
blockTwitterSensitiveMedia(); | |
window.addEventListener("load", blockTwitterSensitiveMedia); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment