您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Render bilibili live room emojis in high resolution
// ==UserScript== // @name Bili Hires Emoji // @namespace http://tampermonkey.net/ // @version 0.2 // @author TZFC // @description Render bilibili live room emojis in high resolution // @match https://live.bilibili.com/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; const removeAt = function(img) { const src = img.src.replace(/@[0-9a-z]*\.webp/g, ''); img.src = src; }; const observeImages = function(images) { images.forEach(function(img) { const src = img.src; if (src && src.includes('.webp') && src.includes('@')) { removeAt(img); } }); }; const observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (mutation.addedNodes.length > 0) { const images = mutation.target.querySelectorAll('img'); observeImages(images); } }); }); observer.observe(document.documentElement, { childList: true, subtree: true }); window.addEventListener('load', function() { const images = document.querySelectorAll('img'); observeImages(images); }); })();