var type="";if (/android/i.test(navigator.userAgent)){ type="android";}if (/ipad|iphone|mac/i.test(navigator.userAgent)){ type="ios"; }