Twitter Disable Twemoji

Disable Twemoji on Twitter.

// ==UserScript==
// @name         Twitter Disable Twemoji
// @namespace    http://lit.link/toracatman
// @version      2024-02-27
// @description  Disable Twemoji on Twitter.
// @author       トラネコマン
// @match        https://twitter.com/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    setInterval(() => {
        var a = document.getElementsByClassName("r-qvutc0");
        for (var i = 0; i < a.length; i++) {
            if (a[i].getAttribute("data-kt") == "true") continue;
            a[i].setAttribute("data-kt", "true");

            var b = a[i].querySelector("img");
            while (b != null) {
                var c = document.createElement("span");
                c.className = "css-1qaijid r-bcqeeo r-qvutc0 r-1tl8opc";
                c.style.textOverflow = "unset";
                c.textContent = b.alt;
                b.before(c);
                b.remove();
                b = a[i].querySelector("img");
            }

            b = a[i].querySelector('span[class="css-1qaijid r-bcqeeo r-qvutc0 r-1tl8opc"]+span[class="css-1qaijid r-bcqeeo r-qvutc0 r-1tl8opc"]');
            while (b != null) {
                b.previousElementSibling.textContent += b.textContent;
                b.remove();
                b = a[i].querySelector('span[class="css-1qaijid r-bcqeeo r-qvutc0 r-1tl8opc"]+span[class="css-1qaijid r-bcqeeo r-qvutc0 r-1tl8opc"]');
            }
        }
    }, 100);
})();