Skip to content

Instantly share code, notes, and snippets.

@amaramth
Created February 17, 2019 08:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amaramth/4943348464ff61739481c7c23d7cb495 to your computer and use it in GitHub Desktop.
Save amaramth/4943348464ff61739481c7c23d7cb495 to your computer and use it in GitHub Desktop.
define [at] appropriately and import jquery and this userscript will take your HNQ troubles away
if( at`*stackexchange.com`||at`*stackoverflow.com`||at`*serverfault.com`||at`*superuser.com`||at`*.askubuntu.com` ){
$('#hot-network-questions li > a:not([href^="http://math."]):not([href^="http://ux."])').closest('li').remove()
$('#hot-network-questions li').removeClass('dno').removeClass('js-hidden')
$('#hot-network-questions > a').remove()
$('.ad-container').remove()
$('#newsletter-ad').parent().remove()
if( at`stackexchange.com` )
$('#question-list > :not([data-sid^="math."]):not([data-sid^="ux."])').remove()
else if( !at`math.stackexchange.com` && !at`ux.stackexchange.com` ){
if (location.pathname in {'/':0 ,'/questions':0 ,'/unanswered':0})
$('#mainbar').remove()
else if( !at`stats.stackexchange.com` )
{ $('#sidebar > .sidebar-linked').remove() ;$('#sidebar > .sidebar-related').remove() }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment