Greasemonkey script to hide “Hot Network Questions” on StackOverflow

It’s not that they’re annoying, it’s that they’re attention-grabbing. I’m trying to get work done here!

// ==UserScript==
// @name _Remove Hot Network Questions
// @include https://stackoverflow.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
// @grant GM_addStyle
// ==/UserScript==
//- The @grant directive is needed to restore the proper sandbox.

/*--- Use the jQuery contains selector to find content to remove.
Beware that not all whitespace is as it appears.
*/

$("div[id$='hot-network-questions']").remove()


//-- Or use .hide(); to just hide the content.

Mostly from: https://stackoverflow.com/questions/53839574/how-to-remove-a-div-with-a-changing-id-via-tampermonkey-greasemonkey#comment94527524_53839574. See also https://mattbk.com/2020/09/how-to-ignore-port-on-the-grand-forks-herald-website/.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.