您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Hides the Hot Network Questions sidebar on Stack Exchange and Stack Overflow; it's just so distracting!
// ==UserScript== // @name Cold Network Questions // @namespace kunaifirestuff // @description Hides the Hot Network Questions sidebar on Stack Exchange and Stack Overflow; it's just so distracting! // @include * // @version 4 // @grant none // ==/UserScript== // If the document contains an element with the id "hot-network-questions", // and this element has a child which has a child which is a link // the url of which contains "stackoverflow.com", then we are sure this // is a stackexchange site. // Is it too redundant? Probably. var hot = document.getElementById("hot-network-questions"); var isItStackexchange = false; Loopy: for(var i = 0; i < hot.children.length; i++){ if(hot.children[i].children.length > 0 && hot.children[i].children[0].tagName == "A"){ if(hot.children[i].children[0].href.indexOf("stackexchange.com") > -1){ isItStackexchange = true; break Loopy; } } } if(isItStackexchange){ hot.outerHTML = ""; }