Hide the Community Bulletin

Hides per-site meta links from Community Bulletin

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name           Hide the Community Bulletin
// @author         Cameron Bernhardt (AstroCB)
// @version        3.0.1
// @namespace  https://github.com/AstroCB
// @description  Hides per-site meta links from Community Bulletin
// @include        http://*.stackexchange.com/*
// @include        http://stackoverflow.com/*
// @include        http://meta.stackoverflow.com/*
// @include        http://serverfault.com/*
// @include        http://meta.serverfault.com/*
// @include        http://superuser.com/*
// @include        http://meta.superuser.com/*
// @include        http://askubuntu.com/*
// @include        http://meta.askubuntu.com/*
// @include        http://stackapps.com/*
// ==/UserScript==
var cb = document.getElementsByClassName("spacer");
var clear = true;

if (cb) {
	var links = [];

	for (var i = 0; i < cb.length; i++) {
		if(cb[i].parentElement.className == "related"){
			links[i] = cb[i];
		}
	}
	for (var j = 0; j < links.length; j++) {
		if ((links[j].children[1].children[0].href.search(/meta\.stackexchange\.com/) === -1) && (links[j].children[1].children[0].href.search(/meta/) === 7)) {
			links[j].hidden = "hidden";
		}else{
			clear = false;
		}
	}
	if (clear){
		var bulletin = document.getElementsByClassName("community-bulletin")[0];
		bulletin.hidden = "hidden";
	}else{
		var title = document.getElementsByClassName("bulletin-title");
		var separators = document.getElementsByTagName("hr");

		for(var x = 0; x < title.length; x++){
			if(title[x].innerHTML.search(/\s*Hot Meta Posts\s*/) !== -1){
				title[x].hidden = "hidden";
				if(separators[x]){
					separators[x].hidden = "hidden";
				}
			}
		}
	}
}