Gmail - Hide Selected Label

By jmerz Last update Nov 25, 2009 — Installed 407 times.


Script Summary: Hides the labels for the currently viewed tag as a workaround to the fact that GMail now shows all labels in the thread pane.

As of 2009/02/04, GMail added the new "Move to" and "Labels" menus, which are completely awesome, except that now, if you view messages in a particular label by selecting that label in the left-hand pane, the label is displayed for every message in the thread pane. This script hides the currently selected label in the thread pane (other labels are still visible though).

A few days ago (2010-01-28, I think) GMail seems to have changed again and the Greasemonkey API for GMail is broken. I'm working on a version of this script that does not use the broken API and will post it as soon as it is ready. Thanks for your patience.


Update History:

Version 1.3.2: 2009-11-25:

  • The GMail GreaseMonkey API has been broken for over a week now. I was hoping they would just fix it, but it's still broken, so I've modified the script to stop using the GMail API.

Version 1.3.1: 2009-03-13:

  • Fixed bug causing slow/backup xpath expression to fail.
  • Updated to match change to internal structure of GMail.

Version 1.3.0: 2009-03-09:

  • Bug Fix: Modify the level at which labels are hidden to catch the little dot of color that was still visible when using colored labels.
  • New Feature: Add hiding of GMail's "special" labels - "Sent Mail", "Drafts", "All Mail", "Spam", "Trash".

Version 1.2.0: 2009-03-03 - Another change to GMail's page structure, and put in a brief wait on load to ensure that the GMail GreaseMonkey API is fully loaded before attempting to use it.

Version 1.1.0: 2009-02-18 - Added a backup method for finding label elements that is slower, but should work if/when Google changes the structure of the GMail page. Updates will still be made to match the page so we can find and remove labels as efficiently as possible, but this will keep things going in the mean time.

Version 1.0.1: 2009-02-12 - Google changed GMail's page structure a bit, updated to handle the change.