Skip to content

Instantly share code, notes, and snippets.

@Encosia
Created June 30, 2011 21:40
Show Gist options
  • Select an option

  • Save Encosia/1057308 to your computer and use it in GitHub Desktop.

Select an option

Save Encosia/1057308 to your computer and use it in GitHub Desktop.
Userscript to noop the annoying Stack Overflow "You haven't voted on questions in a while" nag.
// ==UserScript==
// @match http://stackoverflow.com/*
// ==/UserScript==
function exec(fn) {
var script = document.createElement('script');
script.setAttribute("type", "application/javascript");
script.textContent = '(' + fn + ')();';
document.body.appendChild(script);
document.body.removeChild(script);
}
function patchQuestionVotingNag() {
if (!StackExchange || !StackExchange.helpers || !StackExchange.helpers.showErrorPopup)
return;
var oldShowErrorPopup = StackExchange.helpers.showErrorPopup;
StackExchange.helpers.showErrorPopup = function(g, h, i) {
if (h.indexOf('you haven\'t voted on questions in a while') !== -1)
return;
// else
oldShowErrorPopup(g, h, i);
}
}
exec(patchQuestionVotingNag);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment