Last active
December 3, 2021 01:22
-
-
Save hasselmm/20944c0125fb558abf5e32df44ff3e5b to your computer and use it in GitHub Desktop.
Remove Emoji from Twitter Handles
This file contains 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 Remove Emoji from Twitter Handles | |
// @version 1 | |
// @grant none | |
// @include https://twitter.com/* | |
// ==/UserScript== | |
window.addEventListener('DOMContentLoaded', function() { | |
// Every 500 ms… | |
window.setInterval(function() { | |
// … find images within links that have an URL with the string "/emoji/" inside… | |
for (const emoji of document.querySelectorAll("article a[href^='/'] span img[src*='/emoji/']")) { | |
emoji.parentNode.removeChild(emoji); // … and remove them. | |
} | |
}, 500); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment