Created
January 23, 2015 12:57
-
-
Save Zegnat/ce16807213bbd199519a to your computer and use it in GitHub Desktop.
Userscript: removes all the IndieRoyale bundles (royals) you haven’t bought from your collection page.
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 IndieRoyale Hider of Misses | |
// @namespace http://zegnat.net/ | |
// @version 0.1 | |
// @description Removes all the bundles you haven’t bought from your collection page. | |
// @author Martijn van der Ven | |
// @license MIT <http://opensource.org/licenses/MIT> | |
// @match http://www.indieroyale.com/collection | |
// @grant none | |
// ==/UserScript== | |
var kept = 0, | |
boxes = document.getElementsByClassName("deal"), | |
boxes_length = boxes.length; | |
while (kept < boxes_length) { | |
if (boxes[kept].children[0].tagName === 'DIV') { | |
boxes[kept].parentNode.removeChild(boxes[kept]); | |
boxes_length -= 1; | |
} else { | |
kept += 1; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment