Created
October 30, 2014 23:32
-
-
Save larrybolt/a83864907a7c6628bf09 to your computer and use it in GitHub Desktop.
Vimgolf user script
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 Vimgolf challenge duplicate filter | |
// @namespace http://lry.be | |
// @contact [email protected] | |
// @version 0.2 | |
// @description Filtering duplicate entries and displaying the total unique entries at vimgolf | |
// @include http://vimgolf.com/challenges/* | |
// @include http://www.vimgolf.com/challenges/* | |
// ==/UserScript== | |
var a = []; | |
jQuery("#content .success").each(function(i,e) | |
{ | |
if($.inArray($('pre',e).text(),a)!==-1 && $('p.comment',e).length < 1) | |
$(e).hide(); | |
else | |
a.push($('pre',e).text()); | |
}).eq(0).before("<p>There are "+a.length+" unique solutions</p>"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment