detect and support webkit/ios, fixes #96
This commit is contained in:
parent
631c5c39c8
commit
518a032325
1 changed files with 11 additions and 3 deletions
|
@ -16,7 +16,7 @@ Ox.load.UI = function(options, callback) {
|
|||
},
|
||||
{
|
||||
name: 'Chrome',
|
||||
regexp: /(Chrome|CriOS)\/(\d+)\./,
|
||||
regexp: /Chrome\/(\d+)\./,
|
||||
url: 'http://www.google.com/chrome/',
|
||||
version: 10
|
||||
},
|
||||
|
@ -32,6 +32,11 @@ Ox.load.UI = function(options, callback) {
|
|||
url: 'http://www.apple.com/safari/',
|
||||
version: 5
|
||||
},
|
||||
{
|
||||
name: 'WebKit',
|
||||
regexp: /AppleWebKit\/(\d+)\./,
|
||||
version: 534
|
||||
},
|
||||
{
|
||||
name: 'Internet Explorer',
|
||||
url: 'http://windows.microsoft.com/en-US/internet-explorer/products/ie/home',
|
||||
|
@ -46,7 +51,7 @@ Ox.load.UI = function(options, callback) {
|
|||
|
||||
browsers.forEach(function(browser) {
|
||||
var match = browser.regexp && browser.regexp.exec(navigator.userAgent);
|
||||
if (match && match[match.length - 1] >= browser.version) {
|
||||
if (match && match[1] >= browser.version) {
|
||||
browserSupported = true;
|
||||
}
|
||||
});
|
||||
|
@ -153,7 +158,10 @@ Ox.load.UI = function(options, callback) {
|
|||
}).join(' ');
|
||||
*/
|
||||
div.addClass('OxError');
|
||||
isInternetExplorer ? browsers.pop() : browsers.shift();
|
||||
browsers = browsers.filter(function(browser) {
|
||||
return browser.url;
|
||||
});
|
||||
isInternetExplorer ? browsers.pop() : browsers.shift();
|
||||
browsers.forEach(function(browser) {
|
||||
browser.src = Ox.PATH + 'Ox.UI/png/browser' + browser.name.replace(' ', '') + '128.png';
|
||||
Ox.getFile(browser.src, function() {
|
||||
|
|
Loading…
Reference in a new issue