Tab Favicon update
Can you tell me how often the favicon in the sidebar should update? It's mainly a problem with Gmail, as I have a feature enabled which puts the number of unread messages in the favicon, and it regularly gets out of step between the main Chrome tab and the sidebar. Since moving from FF, I'm so used to looking in the sidebar to quickly check for mail, and I end up switching back to gmail only to find there's nothing there.
I guess there may be a performance implication - perhaps it could be made configurable? Or even better if there's a way to register for favicon change events...
Cheers,
David
Answer
Currently it updates the favicon just when the page is re/loaded.
I hadn't actually considered the case of a favicon getting updated at other times. Is the "Unread mail count" feature in Gmail Labs what you are using to get this favicon update?
There might be some way to get an event notification when the favicon changes; I will need to do some research to find out. I'm currently using something called WebKitMutationObserver which lets me receive notifications when something within a page's HTML changes; I'm using this currently for detecting page title changes in the <head><title> element of a page. It is quite possible that this can be extended to watch for favicon changes as well in <head><link rel="icon"> elements.
Yes, it's the Labs feature - although I did use a GM Script before that...
For Gmail, the page title would change too (the unread count is also in braces), so maybe, if it's not too expensive, updating the favicon when the page title changes would be simplest?
Cool - I think what I will do is have the update triggered for when either the title or (assuming I can also detectit ) the favicon changes, and then when either goes off, update both title and favicon in the sidebar if they have actually changed from their existing values.
This should be very cheap because the extension only has to do something when an actual change has occurred.
My current workaround is:
- Enable "Stacked Tabs" in chrome://flags/.
- Pin the Gmail tab(s)
Note that the "Stacked Tabs" feature seems to be Windows-only at the moment.
Now implemented in 2012.10.18.1 release. Verified this works as expected in Gmail with the "Unread icon count" labs feature enabled.
Customer support service by UserEcho
Now implemented in 2012.10.18.1 release. Verified this works as expected in Gmail with the "Unread icon count" labs feature enabled.