Greasy Fork

Greasy Fork is available in English.

m.baidu.com优化

只作用于m.baidu.com这一个网站,效果是消除所有我认为无聊的元素,只保留搜索功能;本脚本永久开源,永久免费

当前为 2021-05-28 提交的版本,查看 最新版本

// ==UserScript==
// @name        m.baidu.com优化
// @namespace   Violentmonkey Scripts
// @match   Violentmonkey Scripts
// @match    http*://m.baidu.com/
// @grant       none
// @version     1
// @author      _
// @description 只作用于m.baidu.com这一个网站,效果是消除所有我认为无聊的元素,只保留搜索功能;本脚本永久开源,永久免费
// @icon         https://bbs.mountblade.com.cn/uc_server/images/noavatar_small.gif
// ==/UserScript==
'use strict';

(function main() {
    var hide_them = document.createElement("style");
    hide_them.id = 'hide_them';
    hide_them.appendChild(document.createTextNode(".sbbd,#navs,#userinfo-wrap,#logo,#menu-container,.menu-icon-layout,.tab_news,#bottom,.callicon-wrap{display:none!important}#index-kw::-webkit-input-placeholder{/*Webkit browsers*/visibility:hidden;}#index-form{width:90%;height:100%;position:fixed;bottom:100px;}"));
    document.getElementById("index-kw").appendChild(hide_them);


    var a1=setInterval(function(){
        var a=document.getElementById("navs").nextElementSibling.nextElementSibling;
        if(a){
            a.setAttribute("class","sbbd");
            clearInterval(a1);
        }
    },500);

})();