Skip to content

Instantly share code, notes, and snippets.

@ahmadseleem
Last active October 12, 2015 19:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahmadseleem/4077193 to your computer and use it in GitHub Desktop.
Save ahmadseleem/4077193 to your computer and use it in GitHub Desktop.
Disable Google Black Bar
// ==UserScript==
// @name Disable Google Black Bar
// @description Hides the ugly Black Bar from Google Search. - ahmadseleem.com -
// @include *.google.*/*
// @exclude *plus.google.*
// ==/UserScript==
(function () {
var css = "#gbx3 {display:none; visibility:hidden; !important;}\n";
css += "#gbzw {display:none; visibility:hidden; !important;}\n";
css += "#gbx1 {top:0 !important;}\n";
css += ".gbmai {display:none; visibility:hidden; !important;}\n";
css += "#gbu, #gbq {top:0 !important;}\n";
css += "#mngb {height: 71px !important;}";
if (typeof GM_addStyle != "undefined") {
GM_addStyle(css);
} else if (typeof PRO_addStyle != "undefined") {
PRO_addStyle(css);
} else if (typeof addStyle != "undefined") {
addStyle(css);
} else {
var heads = document.getElementsByTagName("head");
if (heads.length > 0) {
var node = document.createElement("style");
node.type = "text/css";
node.appendChild(document.createTextNode(css));
heads[0].appendChild(node);
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment