Skip to content

Instantly share code, notes, and snippets.

@Zegnat
Created January 23, 2015 12:57
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 Zegnat/ce16807213bbd199519a to your computer and use it in GitHub Desktop.
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.
// ==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