// ==UserScript== // @name Replace YouTube logo with bilibili // @name:zh-CN 将 YouTube Logo 替换为 bilibili // @namespace http://tampermonkey.net/ // @version 0.1 // @description Replace YouTube logo with bilibili logo // @description:zh-CN 将 YouTube Logo 替换为 bilibili logo // @author ReekyStive // @match https://www.youtube.com/* // @icon https://www.youtube.com/s/desktop/7b7d8869/img/favicon.ico // @grant none // @run-at document-body // @license MIT // @downloadURL https://update.greasyfork.icu/scripts/452971/Replace%20YouTube%20logo%20with%20bilibili.user.js // @updateURL https://update.greasyfork.icu/scripts/452971/Replace%20YouTube%20logo%20with%20bilibili.meta.js // ==/UserScript== (function() { 'use strict'; const style = document.createElement('style'); style.innerHTML = "#logo-icon { display: none; }"; document.body.appendChild(style); const logoSvg = ' '; // this logo is copyrighted to bilibili and modified by ReekyStive window.onload = () => { const logos = document.querySelectorAll('.style-scope .ytd-logo'); for (const item of logos) { item.innerHTML = logoSvg; } const resizeStyle = document.createElement('style');; resizeStyle.innerHTML = "#logo-icon { width: 64px !important; }"; document.body.appendChild(resizeStyle); document.body.removeChild(style); console.log('Replaced YouTube Logo!'); } })();