Favicon with Google 3

By snj14 Last update Aug 22, 2008 — Installed 6,772 times.

Bugfix: clear background icon from behind transparent favicons

in
Subscribe to Bugfix: clear background icon from behind transparent favicons 2 posts, 2 voices



joeytwiddle Scriptwright
FirefoxX11

Hi I like your script. I wrote FaviconizeGoogle earlier this year but only found your script yesterday!

One nice feature of your script is that it loads a default background icon for websites which don't have their own favicon. But one problem with this is that some sites have transparent favicons. In these cases we end up seeing some of the default icon appear behind the loaded favicon. I fixed this by adding the following to the end of the add_favicon() function:

		favicon.addEventListener('load', function(){
			favicon_container.style.backgroundImage = '';
		}, false);

If the website's favicon loads successfully, the background image is removed.

 
nodaguti Scriptwright
FirefoxWindows

The other answer to this problem:
http://loda.jp/script/?id=400

I think it's lighter then joeytwiddle's because it uses only CSS.