Last active
January 3, 2018 14:27
-
-
Save spemer/525f2d1268f398b5b1a6e17b3504e378 to your computer and use it in GitHub Desktop.
This file contains 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 setAppleFavicons(){ | |
let headTitle = document.querySelector('head'); | |
let appleFavIcons = [ | |
{ sizes:'152x152', href: '../touch-icon-ipad.png' }, | |
{ sizes:'180x180', href: '../touch-icon-iphone-retina.png' }, | |
{ sizes:'167x167', href: '../touch-icon-ipad-retina.png' } | |
] | |
appleFavIcons.forEach(function(appleFavIcon){ | |
let setAFavicon= document.createElement('link'); | |
setAFavicon.setAttribute('rel','apple-touch-icon'); | |
setAFavicon.setAttribute('sizes',appleFavIcon.sizes); | |
setAFavicon.setAttribute('href',appleFavIcon.href); | |
headTitle.appendChild(setAFavicon); | |
}); | |
} | |
setAppleFavicons(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment