115

I was going to make a filter for the "Hot Network Questions" by excluding some sites from it. I noticed this answer which talks about "negative filtering" but does not explain how one can do it or if it is possible. There does not seem to be a way to do this, though. On the filter page, my only options are:

on...

So how can I do "All sites except [list]"?

It would also be nice if this could include similar functionality with the meta checkbox. Something like "All main & meta sites except..."

  • The post you linked to is a declined feature request, the answer is just a suggestion that was never implemented. The filter page you posted a screenshot from is also not relevant, it's about all questions not hot questions. – Shadow Wizard Mar 13 '14 at 15:10
  • 1
    @ShadowWizard My apologies for not knowing how to do it. Could you point me in the right direction? – David Starkey Mar 13 '14 at 15:12
  • 1
    No problem, you did the right thing here by posting new feature request. I was just clarifying some points you seemed to miss. – Shadow Wizard Mar 13 '14 at 15:13
  • 1
    @ShadowWizard The filter page was accessed from the Hot Questions page by clicking the link in the text "Create a filter to pick just the topics you want to see..." located on the right of the page. If this link is wrong, it should probably be fixed as well. – David Starkey Mar 13 '14 at 15:18
  • Yes, noticed this. The wording can indeed be confusing for those not familiar with the hot questions/filters concepts. You can start new feature request asking to change the wording, ideally giving your own idea. You'll have my support. :-) – Shadow Wizard Mar 13 '14 at 15:30
  • 2
    @Downvoter: While I respect the ability to be anonymous, I appreciate feedback so I can better not only this question but all future posts I make. If you would be kind enough to elaborate on your reason for the down-vote, I would appreciate it. – David Starkey May 2 '14 at 16:33
  • For exlcuding sites from the filters (and not the Hot questions), see Excluding a set of sites from a filter. – unor Jan 14 '15 at 5:36
  • I hope this is picked up again. I wish there was at least a setting to only show sites you're a member of. – Daniel James Apr 11 '17 at 20:00
  • Is there a way of restarting the debate around this? It is getting ridiculous with Game of Thrones spoilers. – user2891462 Aug 8 '17 at 12:33
  • @user2891462 I'm not sure. There was a bounty offered on it to try to get more attention drawn to it, but nothing happened with that. You might try commenting on Jeremy T's answer to ping him. Or maybe try bringing it up in a chatroom? – David Starkey Aug 8 '17 at 12:54
  • Why do sites which I'm not a member of, show up in 'Hot Network Questions' at all? If I'm not a member, they are simply not part of my 'network'. Worldbuilding and gaming may be fascinating but are irrelevant to me. I find the subject lines distracting and occasionally wander off and waste way too much time reading bits of them. – Ed Randall Apr 24 '18 at 6:03
  • @EdRandall I'm not sure. This answer suggests you should not be seeing sites you have no account with. You might think about asking a new question about it. – David Starkey Apr 24 '18 at 14:33
24
+50

For those that do not want to wait for an official version, I made a short GreaseMonkey script that will hide sites you specify. Use this page to get the official names to use when setting the "ignore" variable. Multiple sites should be separated by a comma (,) and it works best if you avoid putting more than 1 space after commas.

// ==UserScript==
// @name        Hide SE site from Hot Questions
// @namespace   stackexchange
// @description Hide certain Stack Exchange sites from the Hot Network Questions list.
// @include     *stackoverflow.com*
// @include     *superuser.com*
// @include     *serverfault.com*
// @include     *askubuntu.com*
// @include     *stackapps.com*
// @include     *mathoverflow.com*
// @include     *.stackexchange.com*
// @version     1
// @grant       none
// ==/UserScript==

/*
For list of Stack Exchange sites, look here:
    http://stackexchange.com/sites?view=list#traffic

Put your excluded sites here under variable 'ignore'.  Example, if you want to ignore Arqade and Mathematica:
    var ignore="Arqade,Mathematica";
*/
//This is just an example list, I have nothing against these sites, they just happened to have Hot Questions when this was made
var ignore="Programming Puzzles & Code Golf, TeX - LaTeX";

var questList=document.getElementById("hot-network-questions").getElementsByTagName("li");
var curSite="";

ignore=","+ignore.replace(/, /g, ",");

for(i=0;i<questList.length;i++){
    curSite=questList[i].getElementsByTagName("div")[0].title;
    if(curSite.indexOf("Stack Exchange")>1) {
        curSite=curSite.substring(0, curSite.length - 15);
    }

    if(ignore.indexOf(","+curSite)>-1) {
        questList[i].style.display = "none";
    }
}

This should work in all major browsers, but I only tested in Firefox. If you have questions, leave a comment. If you have improvements feel free to edit the answer.

  • 2
    This works for me only if I wrap it into a setTimeout(function(){ ... }, 1000);. But it's still great! – RomanSt Sep 8 '14 at 18:01
  • 1
    @romkyns- The reason why you have to do that is because, on page load, each list item is assigned a style of display: list-item, which overrides Greasemonkey's display:none. Another option, besides setTimeout, is to use visibility:hidden and height:0 – Pikamander2 Feb 19 '15 at 10:11
  • @Pikamander2 interesting. I figured the list was loaded after the page through ajax or something. Good to know. – David Starkey Jun 9 '15 at 15:53
  • 1
    I don't think it's working for me in Chrome even if it's wrapped in setTimeout. – SuperBiasedMan Dec 9 '15 at 12:44
  • This doesn't work for me in Chrome using Tampermonkey. – Martin Argerami May 13 '17 at 16:34
  • Note that there's Beer, Wine & Spirits so using , as the separator won't work if you want to exclude it – phuclv Aug 22 '18 at 15:07
  • I'm using Chrome and I solved it using questList[i].parentElement.removeChild(questList[i]); i--; instead of the display = none thing. – Dukeling Oct 17 '18 at 21:17
15

I've adopted - and am very grateful for - Pikamander2's solution. My version now looks like this.

(Update: in Firefox 64, I've had to add the @require statement to include jQuery, and the @match/@exclude statements no longer work - I have to configure that from within the GreaseMonkey menu instead.)

// ==UserScript==
// @name Hide Hot Network Questions
// @version     4
// @grant       none
// @require     https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
// @match       *://*.askubuntu.com/*
// @match       *://*.mathoverflow.net/*
// @match       *://*.serverfault.com/*
// @match       *://*.stackapps.com/*
// @match       *://*.stackexchange.com/*
// @match       *://*.stackoverflow.com/*
// @match       *://*.superuser.com/*
// @exclude     *://api.stackexchange.com/*
// @exclude     *://blog.*.com/*
// @exclude     *://chat.*.com/*
// @exclude     *://data.stackexchange.com/*
// @exclude     *://elections.stackexchange.com/*
// @exclude     *://openid.stackexchange.com/*
// @exclude     *://stackexchange.com/*
// see http://meta.stackexchange.com/questions/225297/filter-hot-network-questions-by-excluding-sites
// and http://stackoverflow.com/questions/29682724/why-does-my-greasemonkey-jquery-script-that-hides-the-sidebar-work-on-stack-exch
// ==/UserScript==

//console.log("filtering hot network questions ...");

$.each([
  "astronomy",
  "aviation",
  "codegolf",
  "electronics",
  "gaming",
  "judaism",
  "movies",
  "photo",
  "puzzling",
  "rpg",
  "scifi",
  "space",
  "tridion",
  "worldbuilding",
  "writing"
], function(i, sitename)
{
  //console.log("excluding " + sitename);
  $(".favicon-" + sitename).parent().css('visibility', 'hidden');
  $(".favicon-" + sitename).parent().css('height', '0');
})
  • Though this is a helpful improvement to Pikamander2's solution, it's more of a comment on their answer then a new answer. – SuperBiasedMan Dec 9 '15 at 12:51
  • 3
    I know, but it won't fit into a comment. – reinierpost Dec 9 '15 at 12:54
  • 2
    @SuperBiasedMan so don't upvote, but it doesn't need to be deleted. (So VLQ/NAA flag isn't proper) – Shadow Wizard Dec 9 '15 at 13:15
8

Using Greasemonkey or Tampermonkey:

// ==UserScript==
// @name        Hide Hot Network Questions
// @namespace   GreaseMonkeyStackOverflow
// @description Hides certain Hot Network Questions on Stack Overflow
// @include     https://stackoverflow.com/*
// @include     https://*.stackexchange.com/*
// @include     https://superuser.com/*
// @include     https://serverfault.com/*
// @include     https://mathoverflow.com/*
// @version     1
// @grant       none
// ==/UserScript==
$(".favicon-gaming").parent().css('visibility', 'hidden');
$(".favicon-gaming").parent().css('height', '0');

Replace favicon-gaming with the favicon class name for whatever StackExchange website you don't want to see on the list.

1

In the case you are only willing to install CSS override plugins as opposed to full userscript editors, you can still adjust the the sites shown in the HNQ.

This is possible, because every site has its own favicon, loaded from a global sprite-sheet, and thus every icon has an unique class.

If you want to block the site codereview, you can use inspect element on its favicon, and then copy the class. The insert a css rue like the following using your favorite CSS injector ( I can personally recommend Stylus):

#hot-network-questions .favicon.favicon-codereview,
#hot-network-questions .favicon.favicon-codereview + a {
    display: none;
}

Based on my previous answer on SO meta

-5

We have something along these lines in the hopper to test in the next few weeks.

Sorry, I totally misunderstood the question.

We're going to try some algorithm changes to the hot network questions which will try to guess which sites you like and don't like, and give you more of the sites that you like.

The right sidebar on the hot network questions page is just a way to create filtered questions lists. It really doesn't have anything to do with the hot network questions and I agree it's confusing. It's been that way for a long time, but we'll see if we can make it clearer.

  • 2
    Will it be done via the sidebar, or the full list of hot questions? – Shadow Wizard Mar 13 '14 at 15:31
  • Just the hot network questions for now. – Jeremy T Mar 13 '14 at 15:32
  • 8
    I'll put my vote in for the sidebar too, there are some sites I'd ideally not like to see – Richard Tingle Mar 13 '14 at 15:36
  • 1
    OK, what about the wording in the right sidebar of the hot questions page, you agree it's misleading? At least two users thought it means filtering the hot questions. – Shadow Wizard Mar 13 '14 at 15:39
  • 7
    The request here is to manually filter the sites, algorithm that try to guess... doesn't sound very good to be honest. – Shadow Wizard Mar 13 '14 at 15:56
  • 8
    "guess which sites you like" - oh no, this likely means more hordes of passers-by from hot list that just happen to liek c00l stuff at softer sites like Workplace and Programmers, with their senseless answers and votes. As if we didn't have enough damage already. You'd better redirect them to Stack Overflow, where it's claimed to be an issue of -17 priority – gnat Mar 13 '14 at 17:44
  • 1
    It would really be better if we could still have this feature, even if you mess with the algorithms in addition. After all, some users might just like to see the odd questions Arqade asks, but not be all that interested in gaming. – David Starkey Mar 13 '14 at 17:54
  • 6
    Regards "We're going to try some algorithm changes to the hot network questions which will try to guess which sites you like and don't like, and give you more of the sites that you like.", how about implementing the same thumbs up/thumbs down voting you have for the ads? This way you don't have to guess; users will just tell you which sites they do/don't like to see. Personally, I'd like to be able to turn the whole thing off as I find it distracting, but maybe that's just me. – DeanOC Mar 18 '14 at 0:35
  • 1
    @gnat: You posted that complaint in completely the wrong place, which is why it was downvoted as irrelevant to mods. – Oddthinking Nov 17 '15 at 22:27
  • @Oddthinking I posted it in the right place because I wanted to learn if it's important or not for SO. There's nothing inherently irrelevant there; for comparison, moderators at many smaller sites worry about HNQ. It's just that bunch of funny "site-specific adjustments" in hotness calculation makes it less of an issue at SO compared to other sites. I wanted to learn how much less it is and I learned that – gnat Nov 17 '15 at 22:33
  • @gnat: Let's go to chat. – Oddthinking Nov 17 '15 at 22:38
  • 4
    Whatever algorithm ever got built doesn't work well. I've had it with puzzling and want it off the list for me. – Joshua Jan 24 '18 at 20:27
  • @Joshua no algorithm was ever really used, that's something Jeremy wanted to try, but didn't have the chance to. – Shadow Wizard Feb 5 '18 at 7:51
  • A site I haven't even joined consistently shows up in my hot network feed. (codegolf.stackexchange.com , if it makes a difference.) I'd love to see a way to get rid of this noise. This happens on my laptop browser (where I could potentially use a filter script), in the mobile app, at work where I browse as an anonymous guest... – arp Jun 3 '18 at 16:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .