Restore Twitter Logo

Restores the default blue bird Twitter logo and removes the dog logo forced by Elon Musk

目前為 2023-04-05 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Restore Twitter Logo
// @description  Restores the default blue bird Twitter logo and removes the dog logo forced by Elon Musk
// @namespace    https://www.example.com/
// @version      1.3
// @author       noxljlfsd
// @grant        none
// @match        https://twitter.com/*
// @license MIT
// ==/UserScript==

(function() {
    'use strict';
    document.onreadystatechange = function() {
        //if (document.readyState === 'complete') {
        // Set the default Twitter logo URL
        const defaultLogoUrl = 'https://abs.twimg.com/responsive-web/client-web/icon-ios.8ea219d5.png';
        // Find the Twitter logo element and restore the default logo
        const twitterLogo = document.querySelector("#react-root > div > div > div.css-1dbjc4n.r-18u37iz.r-13qz1uu.r-417010 > header > div > div > div > div:nth-child(1) > div.css-1dbjc4n.r-dnmrzs.r-1vvnge1 > h1 > a > div > svg");
        if (twitterLogo) {
           twitterLogo.outerHTML = `<image xlink:href="${defaultLogoUrl}" src="${defaultLogoUrl}" style="width:1.75rem;height:1.75rem;" alt="">`;
        }
        //}
    };
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址