Created
November 4, 2016 05:19
-
-
Save chrisbrownie/791160bc428b962666c58a8a34313886 to your computer and use it in GitHub Desktop.
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
// From https://gist.github.com/mathiasbynens/428626 | |
document.head || (document.head = document.getElementsByTagName('head')[0]); | |
function changeFavicon(src) { | |
var link = document.createElement('link'), | |
oldLink = document.getElementById('dynamic-favicon'); | |
link.id = 'dynamic-favicon'; | |
link.rel = 'icon'; | |
link.href = src; | |
if (oldLink) { | |
document.head.removeChild(oldLink); | |
} | |
document.head.appendChild(link); | |
} | |
changeFavicon('/adfs/portal/logo/favicon.ico'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment