Skip to content

Instantly share code, notes, and snippets.

@shu8
Last active February 11, 2016 07:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shu8/e3b1b00ceaeb35d3956e to your computer and use it in GitHub Desktop.
Save shu8/e3b1b00ceaeb35d3956e to your computer and use it in GitHub Desktop.
Mark accepted answer if it is not the highest-scored answer
// ==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