Skip to content

Instantly share code, notes, and snippets.

@cyu
Created February 5, 2011 04:53
Show Gist options
  • Save cyu/812214 to your computer and use it in GitHub Desktop.
Save cyu/812214 to your computer and use it in GitHub Desktop.
Hide sidebar in Google Reader (Old)
// ==UserScript==
// @name Google Reader Toggle Sidebar
// @author Calvin Yu
// @namespace http://blog.codeeg.com/google-reader-enhanced
// @description Enhancements to Google Reader UI
// @license Creative Commons Attribution License
// @version 0.1
// @include http://www.google.com/reader/view/*
// @released 2006-10-01
// @updated 2006-10-01
// @compatible Greasemonkey
// ==/UserScript==
/*
* This file is a Greasemonkey user script. To install it, you need
* the Firefox plugin "Greasemonkey" (URL: http://greasemonkey.mozdev.org/)
* After you installed the extension, restart Firefox and revisit
* this script. Now you will see a new menu item "Install User Script"
* in your tools menu.
*
* To uninstall this script, go to your "Tools" menu and select
* "Manage User Scripts", then select this script from the list
* and click uninstall :-)
*
* Creative Commons Attribution License (--> or Public Domain)
* http://creativecommons.org/licenses/by/2.5/
*/
(function(){
//object constructor
function GoogleReaderToggleSidebar(){
var a = document.createElement('a');
a.setAttribute('href', 'javascript:(function(){var n=document.getElementById("nav");if(n.style.display != "none"){n.style.display="none";document.getElementById("chrome").style.marginLeft="20px";}else{n.style.display = "block";document.getElementById("chrome").style.marginLeft="260px";}})()');
a.appendChild(document.createTextNode('Toggle Sidebar'));
var settingsLink = document.getElementById('settings-link');
settingsLink.parentNode.insertBefore(a, settingsLink.nextSibling);
settingsLink.parentNode.insertBefore(document.createTextNode(' | '), settingsLink.nextSibling);
};
//instantiate and run
var gre = new GoogleReaderToggleSidebar();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment