Jul 8 2013
Greesemonkey Script for filtering Stackoverflow Bounty Page
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");
});
});