Google Calendar Collapsible Bars

By Steffen Petersen Last update Sep 5, 2011 — Installed 2,687 times.


Script Summary: Adds buttons to collapse the sidebar (containing the list of calendars) and the search bar (containing the Google logo and calendar search).

Please note

Google have redesigned the menubar where I place the relevant buttons. Therefore the script is broken. I will do my very best to fix this before Christmas. See this topic.

Screenshots

 

Description

The new (as of July 2011) Google Calendar interface uses precious screen real estate for the search bar at the top (containing the Google logo and calendar search) as well as the bar on the left side (containing the list of calendars amongst other gadgets). On smaller screens this leaves the calendar too small especially if overlapping events are displayed. This script will:

  • add two buttons which will allow you to show or hide these two bars. The buttons are placed just left of the "Print" and "Reload" buttons and uses the same layout as the rest of the interface making this script native in its appearance.
  • remember if the bars were hidden or shown. This is local the the current browser and hence not saved to your Google Account.
  • add the shortcut key 'h' (mnemonic hide) to toggle both the Search and Sidebars at the same time.

Works in Firefox, Chrome and Opera.

Known limitations

  • When using narrow windows (less than 1000 picels wide) the buttons controlling the calendar will shrink, which is default behaviour. The script is not yet compatible with this and there will be a gap between the "Sidebar" button and the buttonstrip containing "Day", "Week" etc. buttons. This will be fixed.
  • After installation you have to refresh Google Calendar. Pressing F5 should be sufficient.
  • Chrome and Opera does not have an option to remove the stored preferences, but this is rarely used, if ever.
  • In Opera you will have to enable the hidden option "User JavaScript on HTTPS" if using a secure connection, see this post.

Please let me know if the script does not work as expected or if you would like additional features.

Changes

Most recent version at top.

  • No more missing buttons: Updated to suit changes in the layout.
    Removed (new) left and right margins for the main calendar display.
    Prevented default action for shotcut key h which caused problems for users using search as you type.
  • Fixed persistence for Opera and Chrome by emulating various parts of the GreaseMonkey API, see the topic Cross-browser Userscripts. Original work by James Campos, 2009, 2010.
    Fixed broken hiding by using new ids of divs introduced by Google.
    Added even further @includes a Opera does not understand the ".tld" convention.
    Minor cosmetic changes.
  • Added persistence: State of bars are remebered across page loads.
    Fixed partial uhiding of search bar.
    Added max time to wait for interface to be populated.
    Added further @includes, taken from Google Calendar Header and Navigation Switcher.
  • Hiding Sidebar will hide red Calendar link for added space.
    Refactoring of toggle methods.
  • Fixed partial display of the search bar upon refresh (using Calendars own refresh button or access key).
  • New method for hiding the search bar, fixes missing notifications. Added GPLv3 clause.
  • Initial release.