您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
我只要我自己的头像!
当前为
// ==UserScript== // @name 都是我的头像 // @namespace https://linux.do // @version 0.0.2 // @description 我只要我自己的头像! // @license MIT // @author DengDai // @match https://linux.do/* // @icon https://www.google.com/s2/favicons?sz=64&domain=linux.do // @grant none // ==/UserScript== (function() { 'use strict'; let img_src = document.getElementById("current-user").getElementsByTagName("img")[0].src; function replaceAvatars() { function updateImageSrc(elements) { for (let element of elements) { let imgElement = element.querySelector("img"); if (imgElement && imgElement.src !== img_src) { imgElement.src = img_src; } } } if (window.location.href.includes('/t/topic')) { let divs = document.getElementsByClassName("post-avatar"); updateImageSrc(divs); } else { let tds = document.getElementsByClassName("posters topic-list-data"); for (let td of tds) { let links = td.getElementsByTagName("a"); updateImageSrc(links); } } } replaceAvatars(); const observer = new MutationObserver(replaceAvatars); observer.observe(document.body, { childList: true, subtree: true }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址