Bugfix: clear background icon from behind transparent favicons
![]() ![]() |
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. |
![]() ![]() |
The other answer to this problem:
I think it's lighter then joeytwiddle's because it uses only CSS. |


