Skip to content

Instantly share code, notes, and snippets.

@larrybolt
Created October 30, 2014 23:32
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 larrybolt/a83864907a7c6628bf09 to your computer and use it in GitHub Desktop.
Save larrybolt/a83864907a7c6628bf09 to your computer and use it in GitHub Desktop.
Vimgolf user script
// ==UserScript==
// @name Vimgolf challenge duplicate filter
// @namespace http://lry.be
// @contact larry.bolt@gmail.com
// @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