This time I am manually calling the sendBeacon() function instead of
the script loading an image. This is faster, more privacy-friendly, and
more performant, since sendBeacon is being sent asynchronously. The
script I got at the end is also very small and hosted on my side.
I know, it sounds horrible, but it isn't as bad as it sounds. This is a
GDPR-friendly analytics engine that respects adblockers and doesn't
store any identifying data about the page. I am using it to estimate the
visitors count of this page.
Statistics are available here:
https://share2fedi.goatcounter.com/
Due to questionable privacy policy of Google Fonts (including them being
called illegal by the Munich court [1]), I have decided to self-host the
fonts. I have used the google-webfonts-helper[2] to load the subset
version of the font.
I have also added the `local()` source so that the font will not be
loaded if the user has a font with the same name installed on their
system.
After this commit, toot requires no 3rd-party resources any more 🎉
[1]: https://rewis.io/urteile/urteil/lhm-20-01-2022-3-o-1749320/
[2]: https://google-webfonts-helper.herokuapp.com/