tinycon
tinycon copied to clipboard
Update drawFavicon to be compatible with Chrome
This immediately calls the onload function after it is defined, to ensure that changes are picked up.
Great PR - fixes the Chrome issue: https://github.com/tommoor/tinycon/issues/96
but you have a typo: uload instead of onload
fixed
👋 I don't understand what this achieves, calling the onload before the src is defined. Could one of you speak to the solution?
@tommoor - I honestly haven't looked into why this works, but the key thing in my setup that causes the problem with Chrome seems to be the presence of:
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
Chrome (on MacOS) is actually using this icon instead of the standard favicon.ico or any of the transparent png versions created by https://realfavicongenerator.net/ or one of those other services. It's actually quiet annoying because the apple icon isn't transparent. If I remove the link to the apple icon tinycon works without this fix, but if I want the apple icon, this fix works.
Tinycon broke for us as well and this PR fixes it.