Skip to content

Instantly share code, notes, and snippets.

@basyura
Created August 9, 2011 00:54
Show Gist options
  • Save basyura/1133178 to your computer and use it in GitHub Desktop.
Save basyura/1133178 to your computer and use it in GitHub Desktop.
google calendar style
// ==UserScript==
// @name google calendar hide search bar
// @namespace yahoo_redirector@basyura.org
// @include https://www.google.com/calendar/*
// ==/UserScript==
(function() {
function $(id) {
return document.getElementById(id);
}
var gbz = $('gbz');
if (gbz === null) {
return;
}
var li = document.createElement('li');
li.setAttribute('class' , 'gbt');
var span = document.createElement('span');
span.innerHTML = '検索';
span.setAttribute('class' , 'gbts');
span.style.color = '#CCCCCC';
span.style.cursor = 'pointer';
span.style.padding = '2px';
span.addEventListener('click' , function () {
var header = $('vr-header');
header.style.display = header.style.display == 'none' ? '' : 'none';
} , true);
li.appendChild(span);
gbz.childNodes[1].appendChild(li);
$('vr-header').style.display = 'none';
$('nav').style.margin = '0 10px 0px 10px';
$('mainbody').style.marginLeft = '170px';
var vr_nav = $('vr-nav');
vr_nav.style.height = '25px';
vr_nav.style.margin = '4px';
vr_nav.style.paddingBottom = '8px';
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment