kittyfluff / gaia announcement blocker

// ==UserScript==
// @name gaia announcement blocker
// @namespace kittyfluff
// @version 1.7
// @match *.gaiaonline.com/*
// ==/UserScript==

// hides announcements and also removes the bubble if necessary

var myBubble = document.getElementById("notifyItemList"),
    spam = "";

if (myBubble) {
  spam = myBubble.getElementsByClassName("notify_item notify_announcements");
  if (spam.length) {
    spam[0].setAttribute("style", "display: none !important");
    if (myBubble.children.length < 2) {
      document.getElementById("notifyBubbleContainer").style.display = "none";
    }
  }
}