Gmail Favicon Alerts 3

By Peter Wooley Last update Mar 18, 2011 — Installed 41,485 times.

Google Chrome

in
Subscribe to Google Chrome 44 posts, 13 voices



Fabio72 User
ChromeWindows

It doesn't work in Chrome.
Any suggestion?

 
Peter Wooley Script's Author
FirefoxWindows

Chrome (at this time) does not update its Favicons when the new element is introduced into the DOM, which pretty much makes the Favicon Alerts useless. I'm trying to see how I can get that changed, but haven't had any luck.

I'll try to meet some Chromium hackers and see what I can do.

 
csulok User
ChromeX11

any luck?

google chrome's dev channel recently added a feature that automatically converts user scripts into extensions, so it would be extremely convenient to install this script, once it works

 
Peter Wooley Script's Author
FirefoxWindows

Nope. I'm running the Chromium Nightlies to test and have yet to see any dynamism in the icon. I'll keep trying. I noticed that Chrome OS has some crazy favicons. My not-so-secret wish would be for them to port them on over to the Chrome browser, but as of yet they have not.

 
csulok User
ChromeX11

thanks for the reply

 
loofkid User
ChromeWindows

the google reader favicon count script seems to be working in Chrome 4.0.249.11, if that tells you anything...

 
Peter Wooley Script's Author
ChromeWindows

@loofkid Hmm, I'm on 4.0.254.0 and it still acts screwed up. For me, the icon updates, but only when I take an action (like scrolling down and loading new stories, or clicking on a new feed). And the icon count does not stay current with the actual count in the title (where it's pulling the data from).

Are you experiencing this, or is the icon staying in sync?

 
crazyjoe123 User
ChromeWindows

Here is a workaround: http://code.google.com/p/chromium/issues/detail...

I hope to see your version working on Chrome soon!

 
Peter Wooley Script's Author
FirefoxWindows

Sweet! I'll take a look and see if I can just drop this in for Chrome.

 
Bennett Blod... Scriptwright
ChromeWindows

Another Chrome hint for you:
if you take out the check for "image/x-icon", and replace
newIcon.type = "image/x-icon";
with
newIcon.type = "image/png";
it will work, though I haven't throughly tested it.

 
Peter Wooley Script's Author
FirefoxWindows

I'll have to give that a try this evening. As of yet, I've been unsuccessful getting it back to a working state in Chrome. Maye this'll do the trick!

 
Bennett Blod... Scriptwright
ChromeWindows

Well actually, it worked in your Facebook script, but not the Gmail one.
Just so you don't get frustrated like I did.

 
Peter Wooley Script's Author
FirefoxWindows

Thanks for that update. I'm currently dealing with loading the script in the proper frame, but after it's running, the image/png fix will help immensely, I'm sure. Thanks for the help.

 
armv User
ChromeWindows

Any news on this?

I've slowly been using Chrome more and more, but this is one thing I can't leave behind.

 
iparker User
FirefoxMacintosh

I know you're working on it, but curious about the progress. Like armv, I can't leave firefox without this script. With that being said, this script is tops. Thanks.

 
Peter Wooley Script's Author
FirefoxWindows

Oofta. After nearly 6 hours of hacking around with Chromium, this is an alpha build of Gmail Favicon Alerts with support for Chrome. It's not perfect, but it's working for me, so I'd love it if you'd give it a try and let me know how it goes.

http://snipplr.com/view/29188/

I used crazyjoe123's iframe hack (Thanks!), which gets the job done and 99% of the time does not result in a throbber flash. Assuming this is how it is for everyone else, I'm happy enough with it to push it into the main script (only running in Chrome, of course).

I should note that this code is significantly different than 3.0.9, so it may take a day or two after I get feedback affirming that it works before I can reconcile the main script with this one.

 
Peter Wooley Script's Author
FirefoxWindows

I just realized that Snipplet will require additional work. Here's the script in full: http://pwly.us/gfia31a

 
Henrique Abreu User
MozillaX11

Didn't work for me, but I'm using chromium in Linux.
Here is the error shown in js console:
Uncaught TypeError: Cannot read property 'innerHTML' of undefined yourScript.js:259

 
Peter Wooley Script's Author
FirefoxWindows

Thanks for the feedback, I should be able to test it on OS X and Ubuntu this evening; hopefully it's an easy fix.

 
Peter Wooley Script's Author
FirefoxWindows

I've now tested it on Windows 7 and XP, using Chromium (as far back as 4.0.254.0) and Chrome, though on the Dev channel. It appears to be working. I'm now really curious as to why the Linux version can't find the <title> element, which is causing the error in Henrique Abreu's post.</title>

 
Henrique Abreu User
ChromeX11

Sorry Peter, I forgot to specify my system's version.
I'm using Chromium 5.0.343.0 (40371) under Archlinux 2.6.32 x86_64
But I'll test it in chrome 4.0 when I get time to downgrade it.

 
Peter Wooley Script's Author
FirefoxWindows

No problem, and thanks for letting me know the versions. It seems like the Linux and OS X versions are further behind (sadly so), but I'm not quite sure how it would impact the DOM. We'll see!

 
Juliana Peña User
ChromeWindows

I managed to get the script working perfectly in the latest dev build, but only after uninstalling this extension: https://chrome.google.com/extensions/detail/nnb...
Apparently it adds a style element *above* (not inside) the head element, so it messes up the line "window.frameElement.parentNode.parentNode.firstChild" (line 45), as it returns the style element and not the head element.

 
Peter Wooley Script's Author
FirefoxWindows

Ah, perfect. There's several lines that are a bit fragile in there. I'll update that, revisit the other changes and re-upload. Thanks for digging in!

 
Peter Wooley Script's Author
FirefoxWindows

I should note that the reason for the more ridiculous DOM walking is that Chrome (Well, WebKit) limits the visibility iframes have to window objects for all other iframes and their parent (it literally sets them to null). This appears to be a bug (which I can't find a link to today), so in the future I may be able to revert this back to the much safer window.top.document.getElementsByTagName('head')[0].

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