quick fix to detect and support chrome on iOS

This commit is contained in:
rolux 2012-07-11 16:10:42 +02:00
parent 1ac080f6dd
commit 631c5c39c8

View file

@ -16,7 +16,7 @@ Ox.load.UI = function(options, callback) {
}, },
{ {
name: 'Chrome', name: 'Chrome',
regexp: /Chrome\/(\d+)\./, regexp: /(Chrome|CriOS)\/(\d+)\./,
url: 'http://www.google.com/chrome/', url: 'http://www.google.com/chrome/',
version: 10 version: 10
}, },
@ -46,7 +46,7 @@ Ox.load.UI = function(options, callback) {
browsers.forEach(function(browser) { browsers.forEach(function(browser) {
var match = browser.regexp && browser.regexp.exec(navigator.userAgent); var match = browser.regexp && browser.regexp.exec(navigator.userAgent);
if (match && match[1] >= browser.version) { if (match && match[match.length - 1] >= browser.version) {
browserSupported = true; browserSupported = true;
} }
}); });