Greasy Fork

Greasy Fork is available in English.

谷歌/百度搜索引擎美化/优化

try to take over the world!不定期更新

当前为 2020-06-29 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

    // ==UserScript==
    // @name         谷歌/百度搜索引擎美化/优化
    // @namespace    https://github.com/
    // @version      1.0.7
    // @description  try to take over the world!不定期更新
    // @author       CalendarLi
    // @match        *://www.google.com/search?*
    // @match        *://www.baidu.com/s?*
    // @match        *://baidu.com/s?*
    // @grant        GM_log
    // @connect      google.com
    // @connect      baidu.com
    // @require      http://cdn.staticfile.org/jquery/2.0.0/jquery.min.js

    // ==/UserScript==

    
    (function() {
        var arr=['http://attach.bbs.miui.com/forum/201311/14/234553f16wj1ejnebtt514.jpg',
                'http://d.hiphotos.baidu.com/zhidao/pic/item/6a63f6246b600c334c3e91cb1e4c510fd9f9a16a.jpg',
                'http://attachments.gfan.com/forum/attachments2/201301/29/125722eh9nj87bq20eq2e8.jpg',
                'http://5b0988e595225.cdn.sohucs.com/images/20180821/847d73ce099e4332af5ce8a1ef6df743.jpeg',
                'http://b-ssl.duitang.com/uploads/item/201509/05/20150905141402_driKX.jpeg']
        var index = Math.floor((Math.random()*arr.length));
        var host = window.location.host;
        var addimg=function (e,i){
            console.log(e)
            $(i).prepend('<img id="imgli" />')
            $('#imgli').attr({src:arr[index],style:'position: fixed;opacity: 0.3;'})
        }
        function baidu(){
            setTimeout(function(){
            for(var i=0;i<=$('div').length-1;i++){
                if($($('div')[i]).data('pos')!=undefined){
                    $($('div')[i]).removeAttr('class').remove()
                    $('#rs, div#page>a, div#page>strong').attr({style:'background: none;'})
                    console.log('删除广告:'+i)
                }
            }
            },3000)
        }
        $(document).on('click','#su,a',function(){
            console.log('点击了按钮')
            baidu()
        })
        setTimeout(function(){
            console.log(index)
            $('body').ready(function(){
                if(host==="www.google.com"){
                    addimg('当前为谷歌搜索','body')
                    $('#hdtbSum').attr({style:'opacity: 0.8;'})
                    $('.minidiv').attr({style:'position: fixed;top: 0px;opacity: 0.8;'})
                    $('#footcnt').attr({style:'opacity: 0.6;'})
                    $('#taw').remove();
                    $('#bottomads').remove()
                }else if(host==="www.baidu.com"||host==="baidu.com"){
                    baidu()
                    addimg('当前为百度搜索','#wrapper')
                    $('#page').attr({style:'position: relative; background: #53b4b700;'})
                    $('#rs').remove()
                    $('#wrapper_wrapper').attr({style:'box-shadow: 0 0 7px 0 black;width: 1200px;margin-bottom: 150px;margin-left: 50px;background-color: #dedeee;'})
                }
            })
        },10)
    })();