Last active
February 11, 2016 07:18
-
-
Save shu8/e3b1b00ceaeb35d3956e to your computer and use it in GitHub Desktop.
Mark accepted answer if it is not the highest-scored answer
This file contains 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== | |
// @name Mark accepted answer if it is not the highest-scored answer | |
// @namespace http://stackexchange.com/users/4337810/ | |
// @version 1.0 | |
// @description Mark accepted answer if it is not the highest-scored answer | |
// @author ᔕᖺᘎᕊ (http://stackexchange.com/users/4337810/) | |
// @match *://*.stackexchange.com/questions/* | |
// @match *://*.stackoverflow.com/questions/* | |
// @match *://*.superuser.com/questions/* | |
// @match *://*.serverfault.com/questions/* | |
// @match *://*.askubuntu.com/questions/* | |
// @match *://*.stackapps.com/questions/* | |
// @match *://*.mathoverflow.net/questions/* | |
// @grant none | |
// ==/UserScript== | |
/* jshint -W097 */ | |
'use strict'; | |
setTimeout(function() { | |
if($('.accepted-answer').length) { | |
var accepted_score = $('.accepted-answer').find('.vote-count-post').text(); | |
$('.answer').each(function() { | |
if(+$(this).find('.vote-count-post').text() > (+accepted_score+10)) { | |
$('.accepted-answer').find('.answercell').prepend('<span style="color: red;">Note: There may be other good answers here!</span>'); | |
return; | |
} | |
}); | |
} | |
}, 500); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment