Google Reader title unread count

By Mathias Bertelsen Last update Nov 5, 2006 — Installed 1,737 times. Daily Installs: 3, 1, 6, 1, 2, 2, 2, 4, 5, 1, 1, 0, 0, 1, 1, 3, 1, 2, 2, 1, 1, 0, 0, 0, 2, 2, 2, 1, 1, 5, 0, 0
// ==UserScript==
// @name			Google Reader title unread count
// @namespace     	http://mathiasb.dyndns.org/Google+unread+title
// @description   	Moves unread count in title in front of "Google Reader" (more useful in tabs)
// @include       	http://www.google.com/reader/*
// @include		  	https://www.google.com/reader/*
// ==/UserScript==

unsafeWindow.document.watch('title',
  function(prop, oldval, newval) {
     if (matches = newval.match(/Google Reader \((\d+\+?)\)/)) {
        newval = "(" + matches[1] + ') Google Reader';
     }
     return (newval);
  });