Skip to content

Instantly share code, notes, and snippets.

@hasselmm
Last active December 3, 2021 01:22
Show Gist options
  • Save hasselmm/20944c0125fb558abf5e32df44ff3e5b to your computer and use it in GitHub Desktop.
Save hasselmm/20944c0125fb558abf5e32df44ff3e5b to your computer and use it in GitHub Desktop.
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