hide hot network questions

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

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==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     2
// @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>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", "");
      hsbtn.html("HIDE");
    }
  else
    {
      qlist.css("visibility", "hidden");
      hsbtn.html("SHOW");
    }
});