您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Remove column gaps, enforce max-width + full previews, remove grid, margins & reset positions on Google web search only
当前为
// ==UserScript== // @name Google Search Layout Tweaks // @description Remove column gaps, enforce max-width + full previews, remove grid, margins & reset positions on Google web search only // @match https://www.google.com/search?* // @exclude https://www.google.com/search?*tbm=nws* // @run-at document-start // @version 0.0.1.20250505124405 // @namespace https://greasyfork.org/users/1435046 // ==/UserScript== (function () { const css = ` #rcnt { /*google search not news*/ column-gap: 0 !important; } /* Apply max-width to every search-result wrapper */ .MjjYud { max-width: 290px !important; } /* 2) Remove the -webkit-line-clamp limitation on the snippet */ .VwiC3b.yXK7lf.p4wth.r025kc.hJNv6b.Hdw6tb { -webkit-line-clamp: unset !important; } /* Remove grid display on specific container */ .YNk70c { display: unset !important; } .pZvJc { position: static !important; } `; const style = document.createElement('style'); style.textContent = css; document.head.appendChild(style); const removeMargins = () => { Array.from(document.querySelectorAll('*')).forEach(el => { el.style.setProperty('margin', '0', 'important'); }); }; // Run once at load document.addEventListener('DOMContentLoaded', removeMargins); // Rerun on every DOM mutation new MutationObserver(removeMargins).observe(document.documentElement, { childList: true, subtree: true, attributes: true, attributeFilter: ['style'] }); })();