Created
August 9, 2011 00:54
-
-
Save basyura/1133178 to your computer and use it in GitHub Desktop.
google calendar style
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name google calendar hide search bar | |
// @namespace [email protected] | |
// @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