Skip to content

Instantly share code, notes, and snippets.

@basyura
Created August 4, 2011 01:19
Show Gist options
  • Save basyura/1124298 to your computer and use it in GitHub Desktop.
Save basyura/1124298 to your computer and use it in GitHub Desktop.
hide google toolbar's unnecessary items.
// ==UserScript==
// @name google toolbar
// @namespace basyura.org
// @include https://www.google.com/*
// @include http://www.google.co.jp/*
// @include http://translate.google.co.jp/*
// ==/UserScript==
(function () {
function $(id) {
return document.getElementById(id);
}
function hide(id) {
var ele = $(id);
if (ele !== null) {
ele.style.display = 'none';
}
}
//hide("onegoogbar");
//hide("mngb");
//hide("gb");
hide("gb_119");
hide("gbg6");
hide("gbgs1");
hide("gbgs3");
if ($('gbi4i') !== null) {
$('gbi4i').src = "";
}
if ($("gbmpi") !== null) {
$('gbmpi').src = "";
}
if ($('gbi4m1') !== null) {
$('gbi4m1').innerHTML = '';
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment