Hide the Community Bulletin

Hides Community Bulletin panel

目前为 2014-08-13 提交的版本。查看 最新版本

// ==UserScript==
// @name           Hide the Community Bulletin
// @author         Cameron Bernhardt (AstroCB)
// @version        2.0.0
// @namespace      http://greasyfork.org
// @description    Hides Community Bulletin panel
// @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 num = 0;

if (cb) {
	var links = [];

	for (var i = 0; i < 4; i++) {
		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].style.visibility = "hidden";
		}else{
			num++;
		}
	}
	if (num === 0){
		var bulletin = document.getElementsByClassName("community-bulletin")[0];
		bulletin.style.visibility = "hidden";
		bulletin.style.height = "0";
	}
}