FuckBaidu

隐藏百度搜索首页的多余元素

  1. // ==UserScript==
  2. // @name FuckBaidu
  3. // @namespace https://satori.moe/
  4. // @version 0.2
  5. // @description 隐藏百度搜索首页的多余元素
  6. // @author SatoriKomeiji
  7. // @match https://www.baidu.com
  8. // @match https://www.baidu.com/*
  9. // @match http://www.baidu.com/*
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15. document.getElementById('s_wrap').style.display="none";
  16. $('#kw').on('input',function(){
  17. $('#s_form_wrapper')[0].style.marginTop="";
  18. $('body')[0].style.overflow="";
  19. $('body')[0].style.overflow="";
  20. });
  21. document.getElementById('bottom_container').style.display="none";
  22. $('.mnav')[1].style.display="none";
  23. $('#s_form_wrapper')[0].style.marginTop=window.innerHeight/8+"px";
  24. $('body')[0].style.overflow="scroll";
  25. $('body')[0].style.overflow="hidden";
  26. })();