Script broken with latest GVoice update?
![]() |
Oh noes! It looks like the most recent Gvoice gui rollout has broken this script. Any chance of making it work again? Thank you so much! |
![]() |
I, too, am having problems since the new UI update. Love the new GUI, but I need the favicon working more. Thanks for the script! |
![]() |
I've come up with a fix. I'm sure it's not the best way to do it but it works. Replace the getSearchText method with the one below. I pulled the sidebar container object and did a conversion to text by concatenating with a null string. This gave all the text content including the unread count! Just pulled out what was needed for up to 9999 messages. Done this.getSearchText = function() {
|
![]() |
After half an hour, I cam up with the idea that you could replace (around line 224):
text = top.document.getElementById('gc-inbox-sidebar-menu').firstChild.textContent;
with the following: text = top.document.getElementsByClassName('goog-menuitem gcSidebarItem selectedItem hasCount')[0].lastChild.textContent;
which get the unread count back but I am running into an issue that after an item is marked as read, the unread count in the favicon doesn't update. I'll continue debugging this in Chrome and see if I can get it to update after a change. |
![]() |
HAHA. GOT IT! Apparently, the div classes change when you select, when there's an unread item, etc, so I had to change the getElementsByClassName() to look for "msgCount goog-menuitem-content goog-inline-block" instead. Since there are 12 matches in the DOM, I just picked the first one, which in the main inbox unread count. I got the text content and bam, it fully works again. Tested in FF8 with Greasemonkey nightly (9/29/2011) and in Chrome 16 (dev?) with just native userscript support. My fix is pretty basic though, so I would have been surprised if it was broken in Chrome or FF. Enough talk though, here's the fix: Replace lines 223-225 (the conditional inside the getSearchText function with the following:
Enjoy! I'll try and message Peter Wooley and see if he'll update the script with this change. |
![]() |
Nice. I was just playing around in firebug, which is new to me. I don't have any kind of debug tools setup so I tried the 'msgCount goog-menuitem-content goog-inline-block' object but didn't realize it was an array. I think what I did just grabbed the text from all the child objects and concatenated them. Probably used a little bit more computation but it worked. |
![]() |
Any update? I am completely tech illiterate and have no idea how to do these manual fixes. :( |
![]() |
I've tried sending Peter a message on the Userscripts website and his blog but he seems pretty unresponsive so I've just gone ahead and made a copy of his script with the appropriate changes. You can find the new one here: http://userscripts.org/scripts/show/114981. The one I posted *should* update the old one. Good luck! |
![]() |
Sorry about that. I've updated the script for anyone that still needs it. Thanks for finding and publishing the fix. |

