您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Get rid of Google Doodle logos and link
当前为
// ==UserScript== // @name No Google Doodle // @namespace https://github.com/Procyon-b // @version 0.3 // @description Get rid of Google Doodle logos and link // @author Achernar // @include https://www.google.tld/ // @include https://www.google.tld/?* // @include https://www.google.tld/webhp* // @run-at document-start // @grant none // ==/UserScript== (function() { "use strict"; if (document.readyState != 'loading') fix(); else { document.addEventListener('DOMContentLoaded', function(){ obs.disconnect(); fix(); }); const obs = new MutationObserver(function(muts){ for (let mut of muts) { for (let n of mut.addedNodes) { if (n.classList && n.classList.contains('o3j99')) { if (n.querySelector('#hplogo')) { this.disconnect(); fix(); return; } } } } }); obs.observe(document, { attributes: false, childList: true, subtree: true}); } var logo, outer, style='<style>#replacedDoodle ~ div {display:none;}</style>'; function fix() { if (document.title!='Google') return; logo=document.querySelector('div#hplogo'); if (!logo) { logo=document.querySelector('a > img#hplogo'); if (logo) { logo=logo.parentNode; outer=true; } } if (logo) { if (outer) logo.outerHTML = '<img id="replacedDoodle" style="bottom:0;position:absolute;left:50%;transform:translate(-50%);" src="/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png">'+style; else logo.innerHTML = '<img style="bottom:0;position:absolute;left:50%;transform:translate(-50%);" src="/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png">'+style; } } })();