Greasy Fork

Greasy Fork is available in English.

Bing首页优化

Bing首页优化,去除bing首页的国内版和国际版切换标签,去除底部的版权信息和广告链接,保留首页壁纸切换按钮。

当前为 2021-08-18 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @author      girl
// @icon        https://favicon.yandex.net/favicon/v2/bing.com
// @name        Bing首页优化
// @namespace   Bing首页优化
// @description Bing首页优化,去除bing首页的国内版和国际版切换标签,去除底部的版权信息和广告链接,保留首页壁纸切换按钮。
// @include     *://cn.bing.com/
// @version     1.0.0
// ==/UserScript==
//


(function() {

  var timeFunction = window.setInterval(function(){loadEnd()},200);
  function loadEnd(){
        var footer = document.querySelector('#footer');//est_switch
        var searchNav = document.querySelector('#est_switch');
        var searchBox = document.querySelector('#sb_form_q');
        var sbox = document.querySelector('.sbox');
        if(footer){
          hidenDom(footer);
        }
        if(searchNav){
          hidenDom(searchNav);
        }
        if(searchBox){
          searchBox.onclick=function(){hidenDom(searchNav);};
          searchBox.onfocus=function(){hidenDom(searchNav);};
          searchBox.onblur=function(){hidenDom(searchNav);};
          searchBox.onmousedown=function(){hidenDom(searchNav);};
          //searchBox.parentElement.style.backgroundColor = "#FFFFFFa0";
          //searchBox.style.backgroundColor  = "#FFFFFF00";
        }
        if(sbox){
          sbox.style.margin='0';
            sbox.style.top = "30%"; // 设置位置
            sbox.style.left = "30%";
          }
        }
        function removeDom(dom){
          if(dom){
            dom.remove();
          }
        }
        function hidenDom(dom){
          if(dom){
            dom.style.display = 'none';
          }
        }
  })();