#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
/* ---------------------------------------------------------- */ | |
/* */ | |
/* A media query that captures: */ | |
/* */ | |
/* - Retina iOS devices */ | |
/* - Retina Macs running Safari */ | |
/* - High DPI Windows PCs running IE 8 and above */ | |
/* - Low DPI Windows PCs running IE, zoomed in */ | |
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */ | |
/* - Android hdpi devices and above */ |
#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
(function(document){ | |
window.CLS = window.CLS || {}; | |
CLS.add = function(el, cn){ | |
if(!CLS.exists(el, cn)){ | |
el.className = el.className ? el.className + ' ' + cn : cn; | |
} | |
} |
/* Border & Vignette Setup */ | |
figure{ | |
position: relative; | |
display: block; | |
line-height: 0; | |
width: 500px; | |
height: 333px; | |
margin-bottom: 2em; | |
border: 1em solid #fff; |