hide hot network questions

adds a toggle button to hide/show hot network questions on stackexchange sites

Tính đến 02-08-2017. Xem phiên bản mới nhất.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        hide hot network questions
// @namespace   hasanyavuz.ozderya.net
// @description adds a toggle button to hide/show hot network questions on stackexchange sites
// @include     *.stackexchange.com/*
// @include     *stackoverflow.com/*
// @include     *mathoverflow.net/*
// @include     *serverfault.com/*
// @include     *stackapps.com/*
// @include     *superuser.com/*
// @include     *askubuntu.com/*
// @version     1
// @grant       none
// @require     https://code.jquery.com/jquery-3.2.1.slim.min.js
// ==/UserScript==

// hide initially
qlist = $("#hot-network-questions :gt(1)").css("visibility", "hidden");;

// setup a button to hide/show
hsbtn = $("<a>HIDE/SHOW</a>").css({"font-size":"50%", 
                                   "border-width" : "1px",
                                   "border-style" : "solid",
                                   "padding" : "1px",
                                   "display" : "inline",
                                   "margin-left" : "0.5em"});

hsbtn.insertAfter($("#hot-network-questions h4 a"));

hsbtn.click(function(){
  if (qlist.css("visibility") == "hidden")
    {
      qlist.css("visibility", "");
    }
  else{
    qlist.css("visibility", "hidden");
  }
});