Remove Bing Related Searches

Remove related searches from the sidebar of Bing search pages

当前为 2024-11-07 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Remove Bing Related Searches
  3. // @namespace https://github.com/AbdurazaaqMohammed
  4. // @homepage https://github.com/AbdurazaaqMohammed/userscripts
  5. // @version 1.1
  6. // @description Remove related searches from the sidebar of Bing search pages
  7. // @author Abdurazaaq Mohammed
  8. // @match https://*.bing.com/*
  9. // @run-at document-start
  10. // @grant GM_addStyle
  11. // @license The Unlicense
  12. // @supportURL https://github.com/AbdurazaaqMohammed/userscripts/issues
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. 'use strict';
  17. const myCSS = '.richrswrapper { display: none; }';
  18.  
  19. if (typeof GM_addStyle != "undefined") GM_addStyle(myCSS);
  20. else if (typeof PRO_addStyle != "undefined") PRO_addStyle(myCSS);
  21. else if (typeof addStyle != "undefined") addStyle(myCSS);
  22. else {
  23. var node = document.createElement("style"); node.type = "text/css"; node.appendChild(document.createTextNode(myCSS));
  24. var heads = document.getElementsByTagName("head");
  25. heads.length > 0 ? heads[0].appendChild(node) ? (document.documentElement) : document.documentElement.appendChild(node) : new MutationObserver(function () { if (document.documentElement) { obs.disconnect(); document.documentElement.appendChild(node); } }).observe(document, {childList: true});
  26. }
  27. })();