Last active
May 5, 2023 06:03
-
-
Save roguesleipnir/e7c928577546ba62308e4cfe2b88a93a to your computer and use it in GitHub Desktop.
Hide Twitter Image posts.
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 Hide Twitter Images. Show Videos Only. | |
// @namespace roguesleipnir | |
// @version 1.0 | |
// @include http://twitter.com/* | |
// @include https://twitter.com/* | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js | |
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js | |
// @grant GM_addStyle | |
// ==/UserScript== | |
waitForKeyElements ( | |
// "div[aria-label*='Embedded video']", | |
"div[aria-label*='Image']", | |
hideNode | |
); | |
function hideNode (jNode) { | |
// jNode.hide(); | |
// jNode.parent().parent().parent().parent().parent().parent().parent().parent().parent().hide(); | |
jNode.parent().parent().parent().parent().parent().parent().parent().parent().parent().parent().parent().parent().parent().parent().parent().hide(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment