kittyfluff / gaia garbage blocker

// ==UserScript==
// @name gaia garbage blocker
// @namespace kittyfluff
// @version 0.13
// @match *.gaiaonline.com/*
// ==/UserScript==

// removes various crap from gaia pages

var garbage = [
      "rareevent", // pink links, trunks and other floating stuff
      "dailytreat", // TV in header
      "dailyReward", // claw machine in header
      "cashtree", // cash tree
      "treasureChest", // only contains junk due to lack of updates 
      "tiespend_header", // tier box
    ],
    junk = "";

for (var item = 0; item < garbage.length; item++) {
  junk = document.getElementById(garbage[item]);
  if (junk) {
    junk.setAttribute("style", "display: none !important");
  }
}


// no cash-refill button in header
var gcashplus = document.getElementsByClassName("icon-new gcash-refill-new");
if (gcashplus.length) {
  gcashplus[0].setAttribute("style", "display: none !important");
}


// no red cash-sale label
var gcashsalelabel = document.getElementsByClassName("discount-off-generic");
if (gcashsalelabel.length) {
  gcashsalelabel[0].setAttribute("style", "display: none !important");
}


// no banner in forum
var banner = document.getElementById("offer_banner");

if (banner) {
  banner.parentNode.removeChild(banner);
}