GMail Compactor

By Pavel_Gutin Last update Nov 6, 2009 — Installed 13,746 times.

Unread counts gone

in
Subscribe to Unread counts gone 9 posts, 4 voices



olliebean User

As of today, the icons are no longer displaying the unread message counts. Presumably Google has changed something.

 
Pavel_Gutin Script's Author

DOH! Yeah, looking at the source, it looks like the changed it.
I am working on a updated version right now, so i'll see what i can do to fix it.
Thanks for the catch.

 
Peter Wooley Scriptwright

Hey! I just did a backport of the Gmail FavIcon Alerts to get the script working again. This, unfortunately, breaks compatibility with the Compactor script. My guess would be that the it is going to to continue to update, so I'll be looking into a more permanent hook into the div we're both using.

 
Pavel_Gutin Script's Author

Yeah, i realized it. I think the only way of reliably getting it is to actually crawl though all the elements looking for the word "Inbox". The problem is of course foreign languages.

 
Peter Wooley Scriptwright

What's nice is that the unread indicator ("(42)") is always used, so doing a RegEx for that on the first a tag (gmail.getNavPaneElement().getElementsByTagName('a')[0]) makes it work in every language supported by Gmail.

I believe I may be able to use the existing DOM node, then just grab its parent to properly select the div (which hasn't changed since I started hacking away at the Gmail DOM). I'll to test this out and let you know if it's successful or not.

 
Pavel_Gutin Script's Author

I am working on just doing an XPath search by the word itself, since i need to grab all the links

evalXPath("//*[count(*)=0 and contains(.,'Inbox')]", navPane)[0]

I will have to have an array set up with all the languages in order to use the approach, but it seems to be the most foolproof method.

 
VinnieCool User

For the time being I am using:
var inboxLink = evalXPath("//*[@id=':r4']", navPane)[0].childNodes[0];
var draftsLink = evalXPath("//*[@id=':qw']", navPane)[0].childNodes[0];
var spamLink = evalXPath("//*[@id=':qs']", navPane)[0].childNodes[0];

 
Peter Wooley Scriptwright
FirefoxWindows

I've updated Gmail FavIcon Alerts 3 to once again work with GMail Compactor. You can get the latest copy here: http://userscripts.org/scripts/show/24430

 
Pavel_Gutin Script's Author
FirefoxWindows

Thank you for doing this. I am very close to releasing the next version, and it should no longer interfere with your script, or any script that makes use of the text on the left. I am just having one final snag with anonymous functions.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel