From f695e8fc895f17173c4148ab08e55d5cf59587bc Mon Sep 17 00:00:00 2001 From: Rob Lifford Date: Thu, 29 Sep 2011 10:16:27 -0500 Subject: [PATCH] added iPad --- src/bowser.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/bowser.js b/src/bowser.js index 9d63f66..0f27486 100644 --- a/src/bowser.js +++ b/src/bowser.js @@ -11,6 +11,7 @@ * IE: "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)" * Firefox: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0) Gecko/20100101 Firefox/4.0" * iPhone: "Mozilla/5.0 (iPhone Simulator; U; CPU iPhone OS 4_3_2 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8H7 Safari/6533.18.5" + * iPad: "Mozilla/5.0 (iPad; U; CPU OS 4_3_2 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8H7 Safari/6533.18.5", * Android: "Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; T-Mobile G2 Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1" */ @@ -20,6 +21,7 @@ , chrome = /chrome/i.test(ua) , safari = /safari/i.test(ua) && !chrome , iphone = /iphone/i.test(ua) + , ipad = /ipad/i.test(ua) , android = /android/i.test(ua) , opera = /opera/i.test(ua) , firefox = /firefox/i.test(ua) @@ -43,6 +45,12 @@ , mobile: t , version: ua.match(webkitVersion)[1] } + if (ipad) return { + webkit: t + , ipad: t + , mobile: t + , version: ua.match(webkitVersion)[1] + } if (android) return { webkit: t , android: t