There are 2 previous versions of this script.
// ==UserScript==
// @name Google Reader vertical space maximiser
// @namespace http://lieschke.net/projects/greasemonkey/
// @description Maximises the height of the reader pane in Google Reader. The home section can be toggled on/off via Shift-U.
// @include http*://www.google.com/reader/view/*
// ==/UserScript==
// Quickly hides the message displayed in Google Reader after performing renames,
// folder changes etc. The message displayed after such operations prevents access
// to the home page for feeds and the Folder/Feed settings... drop-down until the
// message disappears (normally ~1min after a successful operation).
unsafeWindow.document.getElementById('message-area-outer').watch('className',
function(prop, oldval, newval) {
setTimeout(function() { document.getElementById('message-area-outer').className = 'hidden' }, 2500);
return newval;
}
);
(function() {
var css = '@namespace url(http://www.w3.org/1999/xhtml);';
css += '.gbh, #add-box, #all-subscriptions-header, #broadcast-selector, #chrome-footer-container, #gbar, #gbh, #global-info, #page-title, #logo-container, #search, #sub-tree-refresh, #view-cards, #view-list { display: none !important; }';
css += '.hide-nav #page-title { display: block !important; }';
css += '.hide-nav-with-menu.home-hidden #sub-tree-box { border-style: solid !important; top: 23px !important; }';
css += 'div.keyboard-help-banner { top: 10px !important; }';
css += '#chrome { padding-top: 0 !important; }';
css += '#nav, #nav-toggler { margin-top: 0 !important; }';
css += '#page-title { margin-top: 2px !important; }';
css += '#settings-frame { top: -10px !important; }';
css += '#stream-prefs-menu { margin-bottom: 1px !important; }';
css += '#stream-prefs-menu-contents { left: auto !important; right: 7px !important; }';
if (typeof GM_addStyle != 'undefined') {
GM_addStyle(css);
} else if (typeof addStyle != 'undefined') {
addStyle(css);
} else {
var node = document.createElement('style');
node.type = 'text/css';
node.appendChild(document.createTextNode(css));
document.getElementsByTagName('head').appendChild(node);
}
// The remainder of this script allows the home section of to be toggled on/off via Shift-U.
var home = null;
var subTree = null;
var hide = function() {
document.body.className += ' home-hidden';
home.style.display = 'none';
subTree.style.height = (window.innerHeight - 31) + 'px';
GM_setValue('hide', true);
}
var show = function() {
document.body.className = document.body.className.replace('home-hidden', '');
home.style.display = '';
subTree.style.height = (window.innerHeight - home.clientHeight - 35) + 'px';
GM_setValue('hide', false);
}
var init = function() {
home = document.getElementById('selectors-box');
subTree = document.getElementById('sub-tree');
if (home == null) {
setTimeout(init, 100);
} else if (GM_getValue('hide')) {
hide();
}
}
init();
document.addEventListener('keyup', function(e) {
if (document.body.className.indexOf('hide-nav') > -1) {
return;
}
if (e.shiftKey && e.keyCode == 85) {
if (home.style.display != 'none') {
hide();
} else {
show();
}
}
}, false);
})();
