From 4f129ad3f5741a377d4c78f66d99e59630559270 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 10 Sep 2018 22:33:46 +0100 Subject: [PATCH] Update bowser to 1.9.4 --- Vendorfile | 2 +- vendor/assets/javascripts/bowser.js | 26 +++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/Vendorfile b/Vendorfile index aeba4bf8b..15a8eba1b 100644 --- a/Vendorfile +++ b/Vendorfile @@ -69,7 +69,7 @@ folder 'vendor/assets' do folder 'javascripts' do file 'html5shiv.js', 'https://raw.githubusercontent.com/aFarkas/html5shiv/master/src/html5shiv.js' - file 'bowser.js', 'https://github.com/lancedikson/bowser/releases/download/1.9.3/bowser.js' + file 'bowser.js', 'https://github.com/lancedikson/bowser/releases/download/1.9.4/bowser.js' end folder 'swfobject' do diff --git a/vendor/assets/javascripts/bowser.js b/vendor/assets/javascripts/bowser.js index 2ec17fb4b..a06971f89 100644 --- a/vendor/assets/javascripts/bowser.js +++ b/vendor/assets/javascripts/bowser.js @@ -36,7 +36,7 @@ , silk = /silk/i.test(ua) , sailfish = /sailfish/i.test(ua) , tizen = /tizen/i.test(ua) - , webos = /(web|hpw)os/i.test(ua) + , webos = /(web|hpw)(o|0)s/i.test(ua) , windowsphone = /windows phone/i.test(ua) , samsungBrowser = /SamsungBrowser/i.test(ua) , windows = !windowsphone && /windows/i.test(ua) @@ -71,6 +71,20 @@ , version: versionIdentifier || getFirstMatch(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i) } } + else if (/Whale/i.test(ua)) { + result = { + name: 'NAVER Whale browser' + , whale: t + , version: getFirstMatch(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i) + } + } + else if (/MZBrowser/i.test(ua)) { + result = { + name: 'MZ Browser' + , mzbrowser: t + , version: getFirstMatch(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i) + } + } else if (/coast/i.test(ua)) { result = { name: 'Opera Coast' @@ -78,6 +92,13 @@ , version: versionIdentifier || getFirstMatch(/(?:coast)[\s\/](\d+(\.\d+)?)/i) } } + else if (/focus/i.test(ua)) { + result = { + name: 'Focus' + , focus: t + , version: getFirstMatch(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i) + } + } else if (/yabrowser/i.test(ua)) { result = { name: 'Yandex Browser' @@ -424,6 +445,9 @@ (result.vivaldi && result.version >= 1.0) || (result.chrome && result.version >= 20) || (result.samsungBrowser && result.version >= 4) || + (result.whale && compareVersions([result.version, '1.0']) === 1) || + (result.mzbrowser && compareVersions([result.version, '6.0']) === 1) || + (result.focus && compareVersions([result.version, '1.0']) === 1) || (result.firefox && result.version >= 20.0) || (result.safari && result.version >= 6) || (result.opera && result.version >= 10.0) || -- 2.39.5