javascript implementation for changing favicon dynamically
usage:
var text = "1";
var imageSrc = "favicon.png";
var faviconChanger = new FavIconChanger();
favIconChanger.changeFavicon(text,imageSrc);
you can add text to favicon or simply change the icon with another png. the only requirement is the icon should be a png file and the browser should be a new one which makes 2 requirements.
to be able to run test.html locally either you should run simple web server that can serve html or use --disable-web-security --user-data-dir tags for chrome to bypass cors restrictions.
measures the text size and changes font size dynamically up to text's size.
WTFLRPL LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar sam@hocevar.net (Owner of WTFPL License)
Version 3, December 2016 (Extended and modified for academic purposes)
Copyright (C) 2016 Önder ALTINTAŞ onderaltintas@gmail.com
Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
- You just DO WHATEVER YOU WANT TO.