diff --git a/dev/templates/parts/head/headScripts.hbs b/dev/templates/parts/head/headScripts.hbs index 78087b5..d3e9dea 100644 --- a/dev/templates/parts/head/headScripts.hbs +++ b/dev/templates/parts/head/headScripts.hbs @@ -32,4 +32,40 @@ } else{ document.documentElement.className += (' ' + (ie + ' ' + 'IE')); }; + + var isIOS = false; + function detectIOS() { + var iDevices = [ + 'iPad Simulator', + 'iPhone Simulator', + 'iPod Simulator', + 'iPad', + 'iPhone', + 'iPod' + ]; + + if (!!navigator.platform) { + while(iDevices.length) { + if (navigator.platform === iDevices.pop()) { + isIOS = true; + // In case if should be in DOM + // for now can be omitted - no styles by default attached to this class name ' iOS' + document.documentElement.className += " iOS"; + } + } + } + } + detectIOS(); + + var isAndroid = false; + var android = uA.indexOf('Android '); + function detectAndroid() { + if (android > 0) { + isAndroid = true; + // In case if should be in DOM + // for now can be omitted - no styles by default attached to this class name ' android' + document.documentElement.className += " android"; + } + } + detectAndroid();