// ==UserScript== // @name Baidu/Google搜索界面优化(AC-baidu-重定向双列优化) // @name:zh Baidu/Google搜索界面优化(AC-baidu-重定向双列优化) // @namespace ouka2020 // @description Baidu/Google搜索界面优化 // @description:zh Baidu/Google搜索界面优化 // @author Ouka2020 // @match *://ipv6.baidu.com/* // @match *://www.baidu.com/* // @match *://www1.baidu.com/* // @match *://encrypted.google.com/search* // @match *://*.google.com/search* // @match *://*.google.com/webhp* // @exclude *://*.google.com/sorry* // @exclude *://zhidao.baidu.com/* // @exclude *://*.zhidao.baidu.com/* // @grant GM_addStyle // @version 0.6.6 // @license GPL-3.0-or-later // @downloadURL none // ==/UserScript== /* Created by TPMK(ver 1.0.0) at 2022/8/28 00:35:50 */ (function () { 'use strict'; const googleCss = "/* google\"\" */\n#main #cnt,\n#cnt #center_col,\n#cnt #foot {\n width: 95vw !important;\n margin: 2px 12px !important;\n}"; const baiduCss = "/* baidu */\nbody #container.sam_newgrid #content_left {\n width: 96vw;\n}"; const googleScrollEventListener = () => document.querySelectorAll("div.ULSxyf").forEach((it) => it.remove()); if (/google/.test(window.location.host)) { GM_addStyle(googleCss); document.querySelectorAll("div.ULSxyf").forEach((it) => it.remove()); document.querySelectorAll("div.M8OgIe").forEach((it) => it.remove()); document.querySelectorAll("div.TQc1id.hSOk2e.rhstc4").forEach((it) => it.remove()); window.addEventListener("scroll", googleScrollEventListener); window.addEventListener("unload", () => window.removeEventListener("scroll", googleScrollEventListener)); } if (/baidu/.test(window.location.host)) { GM_addStyle(baiduCss); } })();