-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstartup.min.js
2 lines (2 loc) · 1.09 KB
/
startup.min.js
1
2
/*! startup.js v0.2.2 - https://github.com/fingerproof/startup.js/blob/master/license.txt */
;(function(){var a=this,b=a.document,c=a.navigator,d={}.hasOwnProperty,e=b.querySelector,f="startup",g="appendChild",h="orientation",i=["portrait","landscape"],j="apple-touch-"+f+"-image",k=c.standalone,l=a.devicePixelRatio>1?"hd":"sd",m=/iP(hone|[ao]d)/i.exec(c.userAgent);c=function(c,n,o,p,q,r){function s(a,b){p[b|0]+=a&&o.sep+a}if(m&&e&&!e.call(b,"link[rel='"+j+"']")){if(o={path:"rsrc/img/"+f,tall:"tall",hd:"@2x",ext:"png",sep:"-"},o.phone=o[i[0]]=o.sd="",o[r="tablet"]=r,o[i[1]]=i[1],typeof c=="object")for(p in c)d.call(c,p)&&d.call(o,p)&&!/\s/.test(q=c[p])&&q===""+q&&(o[p]=q);if(c=[b.createElement("link")],p=[o.path],m[q=1]=="ad")for(s(o[r]),r=k?[i[a[h]/90&1]]:(c[q++]=c[0].cloneNode(),p[1]=p[0],i);q--;s(o[r[q]],q))c[q].media="screen and ("+h+":"+r[q]+")";else s(o.phone),a.screen.height==568&&s(o.tall);for(q=b.createDocumentFragment();r=c.pop();q[g](r))r.rel=j,r.href=p.pop()+o[l]+"."+o.ext;return n!==!1?!!b.getElementsByTagName("head")[0][g](q):q}},typeof define=="function"&&define.amd?define(c):a[f]=c}());