Created
November 11, 2019 21:17
-
-
Save wwwisie/f1da7f9333444628210560b75b991d71 to your computer and use it in GitHub Desktop.
Changing website favicon dynamically
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function() { | |
| var link = document.querySelector("link[rel*='icon']") || document.createElement('link'); | |
| link.type = 'image/x-icon'; | |
| link.rel = 'shortcut icon'; | |
| link.href = '/favicon02.png'; | |
| document.getElementsByTagName('head')[0].appendChild(link); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment