lib/browser_sniffer/patterns.rb in browser_sniffer-1.0.1 vs lib/browser_sniffer/patterns.rb in browser_sniffer-1.0.4
- old
+ new
@@ -32,10 +32,11 @@
'NT 5.1' => 'XP',
'NT 5.2' => 'XP',
'NT 6.0' => 'Vista',
'NT 6.1' => '7',
'NT 6.2' => '8',
+ 'NT 6.3' => '8.1',
'ARM' => 'RT'
}
}
}
}
@@ -57,10 +58,12 @@
# Trident based
/(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?((\d+)?[\w\.]*)/i # Avant/IEMobile/SlimBrowser/Baidu
], [:name, :version, :major], [
/(?:ms|\()(ie)\s((\d+)?[\w\.]+)/i # Internet Explorer
], [:name, :version, :major, [:type, :ie]], [
+ /Mozilla\/5.0.*Windows NT 6\.\d.*Trident\/7\.\d.*rv:(\d+)\.\d*/i #IE11 on Win7
+ ], [:major, [:version, 7], [:name, 'Internet Explorer'], [:type, :ie]], [
# Webkit/KHTML based
/(rekonq)\/?((\d+)[\w\.]+)*/i, # Rekonq
/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt)\/((\d+)?[\w\.-]+)/i # Chromium/Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt
], [:name, :version, :major], [
/(yabrowser)\/((\d+)?[\w\.]+)/i # Yandex
@@ -75,9 +78,11 @@
/(dolfin)\/((\d+)?[\w\.]+)/i # Dolphin
], [[: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
], [: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]], [