Created
June 30, 2011 21:40
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==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