Skip to content

Instantly share code, notes, and snippets.

@hasselmm
Last active December 3, 2021 01:22
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Remove Emoji from Twitter Handles
// ==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