4

About

This Greasemonkey script enables you to hide questions you don't want to see. At the moment Stack Overflow gives you the option to "dim" or hide questions with but doesn't allow you to tag individual questions in your lists. This plugin does just that.

Download

userscript-mirror.org - screenshots also available from this link.

Screenshot / Code Snippet

Full code, screenshots, usage and description available here

try {
  if(!(hiddenQuestions=JSON.parse(GM_getValue('so-hidden-questions','[]'))))
    throw 'Invalid store questions: '+hiddenQuestions;
  console.log(hiddenQuestions);
} catch(e) {
  console.log(e);
  GM_setValue('so-hidden-questions',JSON.stringify([]));
}

if( $('#question').length ) {

  $('#hmenus .mainnavs ul').append('<li><a href="#" id="nav-hidden-hide">Hide</a></li>');
  $('#nav-hidden-hide').click(function(){
    hiddenQuestions.push($('#question').attr('data-questionid'));
    setTimeout(function(){GM_setValue('so-hidden-questions',JSON.stringify(hiddenQuestions))},0);
    window.location = document.referrer;
    return false;
  });
  //...
}

License

Distributed under the BSD License

Platform

Tested on Windows 7, Firefox 21.0, Greasemonkey 1.9

Contact

Created & maintained by Precastic. Contact me through my Stack Overflow profile.

Code

Written in javascript, using jQuery, running in Greasemonkey. All contributions are welcome. Please contact me for more info.

This is my first Greasemonkey script and I struggled a bit with the limitations of the standbox, so have probably used questionable code in some places like unsafeWindow.jQuery. This will be updated as needed in the coming versions.

Future Enhancements

  • I would like to implement an "ignored-on" timestamp so that old questions can be flushed without clearing all hidden questions when the user clears their hidden questions. This will help with performance without needing the user to start he/her list over.
  • I would like to align this better with the look & feel of SO's ignore tags functionality, giving it a more Stack Overflow-like feel.
3
  • Actually, if you go to your preferences page (which only you can see), and check the hide ignored tags box, it will hide those unwanted questions, not just dim them. ... See, also, meta.stackoverflow.com/tags/ignored-tags/info . Jun 20, 2013 at 1:12
  • @BrockAdams Thanks Brock. Nice to know the help is so well dispersed, I wish there was 1 help page that had an index to all the help instead of having to search for it ;)
    – Precastic
    Jun 20, 2013 at 5:53
  • They're working on it. If you notice something wrong or missing (like this option) you can bring it up on meta. Jun 20, 2013 at 6:15

0

You must log in to answer this question.

Browse other questions tagged .