Fixed check for iPhone OS 3 - it now returns true on 3.0 or any later version including 4.x
authorDan Fuhry <dan@enanocms.org>
Fri, 24 Sep 2010 21:50:25 -0400
changeset 1305 ba8a648baebc
parent 1304 0470b3176781
child 1306 e00489a30c72
Fixed check for iPhone OS 3 - it now returns true on 3.0 or any later version including 4.x
includes/clientside/static/enano-lib-basic.js
--- a/includes/clientside/static/enano-lib-basic.js	Tue Sep 21 14:15:04 2010 -0400
+++ b/includes/clientside/static/enano-lib-basic.js	Fri Sep 24 21:50:25 2010 -0400
@@ -57,7 +57,7 @@
 var IE_8 = checkIt('msie 8.');
 var is_Opera = checkIt('opera');
 var is_iPhone = checkIt('iphone') || checkIt('ipod');
-var is_iPhone_3 = checkIt('iphone os 3_');
+var is_iPhone_3 = checkIt('iphone') && Number(navigator.userAgent.replace(/^.*iPhone OS ([0-9]+)_([0-9]+) .*$/, '$1.$2')) >= 3.0;
 var is_Webkit = checkIt('applewebkit');
 var is_Gecko = checkIt('gecko');
 var is_firefox2 = checkIt('firefox/2.');