lib/browser_sniffer/patterns.rb in browser_sniffer-1.0.6 vs lib/browser_sniffer/patterns.rb in browser_sniffer-1.0.7
- old
+ new
@@ -79,11 +79,11 @@
], [[:name, 'Dolphin'], :version, :major], [
/((?:android.+)crmo|crios)\/((\d+)?[\w\.]+)/i # Chrome for Android/iOS
], [[:name, 'Chrome'], :version, :major, [:type, :chrome]], [
/version\/((\d+)?[\w\.]+).+?mobile\/\w+\s(safari)/i # Mobile Safari
], [:version, :major, [:name, 'Mobile Safari'], [:type, :safari]], [
- /Mozilla\/5.0 \(iPhone;(.*)AppleWebKit\/((\d+)?[\w\.]+).+?(mobile)\/\w?/i # ios webview
+ /Mozilla\/5.0 \((?:iPhone|iPod(?: Touch)?);(.*)AppleWebKit\/((\d+)?[\w\.]+).+?(mobile)\/\w?/i # ios webview
], [:version, :major, [:name, 'Mobile Safari'], [:type, :safari]], [
/version\/((\d+)?[\w\.]+).+?(mobile\s?safari|safari)/i # Safari & Safari Mobile
], [:version, :major, :name, [:type, :safari]], [
/webkit.+?(mobile\s?safari|safari)((\/[\w]+))/i # Safari < 3.0
], [:name, [:major, STRING_MAP[:browser][:oldsafari][:major]], [:version, STRING_MAP[:browser][:oldsafari][:version]], [:type, :safari]], [
@@ -117,10 +117,10 @@
/(hp).+(touchpad)/i, # HP TouchPad
/(kindle)\/([\w\.]+)/i, # Kindle
/\s(nook)[\w\s]+build\/(\w+)/i, # Nook
/(dell)\s(strea[kpr\s\d]*[\dko])/i # Dell Streak
], [:vendor, :model, [:type, :tablet]], [
- /\((ip[honed]+);.+(apple)/i # iPod/iPhone
+ /\((?:iphone|ipod(?: touch)?);.+(apple)/i # iPod Touch/iPhone
], [:model, :vendor, [:name, :iphone], [:type, :handheld]], [
/(blackberry)[\s-]?(\w+)/i, # BlackBerry
/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|huawei|meizu|motorola)[\s_-]?([\w-]+)*/i, # BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Huawei/Meizu/Motorola
/(hp)\s([\w\s]+\w)/i, # HP iPAQ
/(asus)-?(\w+)/i # Asus