Greasy Fork is available in English.
Baidu/Google搜索界面优化
当前为
// ==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.7
// @license GPL-3.0-or-later
// ==/UserScript==
/* Created by TPMK(ver 1.0.0) at 2022/9/17 20:09:48 */
(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());
document.querySelectorAll("div.exp-outline").forEach((it) => it.remove());
};
if (/google/.test(window.location.host)) {
GM_addStyle(googleCss);
document.querySelectorAll("div.ULSxyf").forEach((it) => it.remove());
document.querySelectorAll("div.exp-outline").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);
}
})();