szumczyksum / Wykop.pl – delete articles below X digs

// ==UserScript==
// @name Wykop.pl – delete articles below X digs
// @namespace wykop.pl
// @description Deletes articles with dig-points below X points
// @include *wykop.pl/*
// @include *wykop.pl/strona/*
// @version 1
// @grant none
// ==/UserScript==

var MIN_VALUE = 1000;

var doc = document.getElementsByClassName('link iC');
for (i = doc.length - 1; i >= 0; i-- )
{
  var li = doc.item(i);
  //li.textContent
  var digBox = li.getElementsByClassName('diggbox');
  var digBox1 = digBox.item(0);
  var spans = digBox1.getElementsByTagName('span');
  var span = spans.item(0)
  var value = span.innerHTML;
  if (value < MIN_VALUE)
  {
    li.remove();
  }
}