Greasemonkey/Tampermonkey: Expand the area of schedule details on Google Calendar
// ==UserScript== | |
// @name Google Calendar Expander | |
// @namespace http://0-oo.net | |
// @description Expand the area of schedule details on Google Calendar | |
// @homepage http://0-oo.net/log/category/greasemonkey/google-calendar-expander/ | |
// @include https://calendar.google.com/calendar/* | |
// @version 0.3.1 | |
// @grant none | |
// ==/UserScript== | |
// | |
// ( The MIT License ) | |
// | |
(function() { | |
// Hide the right space | |
document.getElementById("gridcontainer").style.marginRight = 0; | |
// Add the button to show / hide the left column | |
var mainbody = document.getElementById("mainbody"); | |
var btn = document.createElement("button"); | |
btn.setAttribute("style", "position: absolute; left: 0; bottom: 0; cursor: pointer"); | |
btn.onclick = function() { | |
if (mainbody.style.marginLeft == "0px") { | |
mainbody.style.marginLeft = "180px"; | |
btn.innerHTML = "←"; | |
} else { | |
mainbody.style.marginLeft = "0px"; | |
btn.innerHTML = "→"; | |
} | |
// Remove the dashed lines on the clicked button | |
btn.blur(); | |
}; | |
document.body.appendChild(btn); | |
// Hide the left column | |
btn.onclick(); | |
// Trim the white space of the nav bar | |
var vrnav = document.getElementById("vr-nav"); | |
vrnav.style.marginTop = 0; | |
vrnav.style.paddingBottom = 0; | |
// Add the button to show / hide Google bar | |
var googbar = document.getElementById("onegoogbar"); | |
var btn2 = document.createElement("button"); | |
btn2.setAttribute("style", "position: absolute; left: 0; top: 0; cursor: pointer; z-index: 1000"); | |
btn2.onclick = function() { | |
if (googbar.style.display == "none") { | |
googbar.style.display = "block"; | |
btn2.innerHTML = "↑"; | |
} else { | |
googbar.style.display = "none"; | |
btn2.innerHTML = "↓"; | |
} | |
// Remove the dashed lines on the clicked button | |
btn2.blur(); | |
}; | |
document.body.appendChild(btn2); | |
// Hide Google bar | |
btn2.onclick(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment