Greesemonkey Script for filtering Stackoverflow Bounty Page

This specific content was written 12 years ago. Please keep this in mind as it may be outdated and not adhering to best-practices.

I’m a big fan of stackoverflow and many times surf the featured page that has many questions that have an additional bounty attached.
One of the things though that I want to do is quickly find the questions with zero answers that have not received attention due to one reason or another (e.g. very difficult).

For the specific URL: http://stackoverflow.com/questions?sort=featured , Below a greesemonkey script just for that!



// ==UserScript==
// @name Remove unanswered
// @namespace http://menios.com
// @description Remove answered Questions
// @include http://stackoverflow.com/questions?*
// ==/UserScript==


$(document).ready(function() {
var hideButton= $('<input/>').attr({ type: 'button', name:'btn1', value:'Hide Answered'});
hideButton.css("font-size","9px");
hideButton.css("display","block");
$("#h-all-questions").append(hideButton);

hideButton.click(function() {
$( "div.answered" ).each(function(index, value){
value.parentNode.parentNode.parentNode.style.display = "none";
});

$( "div.answered-accepted" ).each(function(index, value){
value.parentNode.parentNode.parentNode.style.display = "none";
});

hideButton.css("display","none");
showButton.css("display","block");
});

var showButton= $('<input/>').attr({ type: 'button', name:'btn2', value:'Show Answered'});
showButton.css("font-size","9px");
showButton.css("display","none");
$("#h-all-questions").append(showButton);

showButton.click(function() {
$( "div.answered" ).each(function(index, value){
value.parentNode.parentNode.parentNode.style.display = "block";
});

$( "div.answered-accepted" ).each(function(index, value){
value.parentNode.parentNode.parentNode.style.display = "block";
});

showButton.css("display","none");
hideButton.css("display","block");
});

});

hide answered

show answered



Menelaos Bakopoulos

Mr. Menelaos Bakopoulos is currently pursuing his PhD both at Center for TeleInFrastruktur (CTiF) at Aalborg University (AAU) in Denmark and Athens Information Technology (AIT) in Athens, Greece. He received a Master in Information Technology and Telecommunications Systems from Athens Information Technology and a B.Sc. in Computer Science & Management Information Systems from the American College of Thessaloniki. Since April 2008 he has been a member of the Multimedia, Knowledge, and Web Technologies Group.

More Posts