Show HN: Zany – Favicon API
zany.sh
Show HN: Zany – Favicon API
1–10 of 12 posts
Re: Show HN: Zany – Favicon API
#2 Re: Show HN: Zany – Favicon API
#3As an alternative approach you can use an empty data URL to get an empty favicon:
Thank you
Re: Show HN: Zany – Favicon API
#4As an alternative approach you can use an empty data URL to get an empty favicon:
Re: Show HN: Zany – Favicon API
#5 data:text/html,
This one for example shows nearly invisible text in dark theme for me.Or maybe add text input to dynamically update current page's favicon to see the outcome instantly.
Re: Show HN: Zany – Favicon API
#6Re: Show HN: Zany – Favicon API
#7http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22>FAVORITE EMOJI HERE">
Re: Show HN: Zany – Favicon API
#8You can make folks test it in their browsers by instructing them to copy and paste dataURI into their URL bar, like: data:text/html, This one for example shows nearly invisible text in dark theme for me. Or maybe add text input to dynamically update current page's favicon to see the outcome instantly.
Re: Show HN: Zany – Favicon API
#9Re: Show HN: Zany – Favicon API
#10Or you can get a emoji as favicon with: http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22> FAVORITE EMOJI HERE ">
data:text/html;charset=utf-8,%F0%9F%A6%84'>
But haven't tested outside Windows, so it will be most probably off in some browsers (Safari?).Or this funky quine document with same unicorn emoji that rotates or fades depending on prefers-reduced-motion:
data:text/html;charset=utf-8,%0A%F0%9F%A6%84@keyframes x{to{transform:rotate(1turn)}}@keyframes y{to{opacity:0}}text{animation:2s x infinite alternate}@media(prefers-reduced-motion){text{animation-name:y}}'>%0AAnimated favicon affected by `prefers-reduced-motion` media query, embedded in datauri inside datauri document%0A:not(style,script){display:block; padding:0 .2em; background:darkslategray; color:snow; white-space:pre-wrap} title::after{content:' (in `' var(--prm) '` mode)'}html{--prm:'no-preference'}@media(prefers-reduced-motion:reduce){html{--prm:'reduce'}}%0Adocument.write('',decodeURIComponent(document.URL))