1
0
mirror of https://github.com/lancedikson/bowser synced 2024-10-27 20:34:22 +00:00

Support recognizing WebView for Chrome and Safari

This commit is contained in:
Eiman Iranpour 2020-10-16 17:12:31 +03:30
parent f09411489c
commit 9af39ded96
2 changed files with 60 additions and 0 deletions

View File

@ -603,6 +603,12 @@ const browsersList = [
browser.version = version; browser.version = version;
} }
const webview = Utils.matchAndReturnConst(/Android.*(wv|.0.0.0)/i, ua, true);
if (webview) {
browser.webview = webview;
}
return browser; return browser;
}, },
}, },
@ -673,6 +679,12 @@ const browsersList = [
browser.version = version; browser.version = version;
} }
const webview = Utils.matchAndReturnConst(/(iPhone|iPod|iPad)(?!.*Safari)/i, ua, true);
if (webview) {
browser.webview = webview;
}
return browser; return browser;
}, },
}, },

View File

@ -336,6 +336,36 @@
type: "tv" type: "tv"
engine: engine:
name: "Blink" name: "Blink"
- ua: "Mozilla/5.0 (Linux; Android 4.4; Nexus 5 Build/_BuildID_) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36"
spec:
browser:
name: "Chrome"
version: "30.0.0.0"
webview: true
os:
name: "Android"
version: "4.4"
versionName: "KitKat"
platform:
type: "mobile"
vendor: "Nexus"
engine:
name: "Blink"
- ua: "Mozilla/5.0 (Linux; Android 5.1.1; Nexus 5 Build/LMY48B; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/43.0.2357.65 Mobile Safari/537.36"
spec:
browser:
name: "Chrome"
version: "43.0.2357.65"
webview: true
os:
name: "Android"
version: "5.1.1"
versionName: "Lollipop"
platform:
type: "mobile"
vendor: "Nexus"
engine:
name: "Blink"
Google Search: Google Search:
- -
ua: "Mozilla/5.0 (iPhone; CPU iPhone OS 12_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) GSA/83.0.268992909 Mobile/15E148 Safari/605.1" ua: "Mozilla/5.0 (iPhone; CPU iPhone OS 12_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) GSA/83.0.268992909 Mobile/15E148 Safari/605.1"
@ -881,6 +911,7 @@
spec: spec:
browser: browser:
name: "Safari" name: "Safari"
webview: true
os: os:
name: "iOS" name: "iOS"
version: "7.0.4" version: "7.0.4"
@ -961,6 +992,7 @@
browser: browser:
name: "Safari" name: "Safari"
version: "3.1" version: "3.1"
webview: true
os: os:
name: "macOS" name: "macOS"
version: "10.5.2" version: "10.5.2"
@ -1152,6 +1184,7 @@
spec: spec:
browser: browser:
name: "Safari" name: "Safari"
webview: true
os: os:
name: "iOS" name: "iOS"
version: "11.4.1" version: "11.4.1"
@ -1162,6 +1195,21 @@
engine: engine:
name: "WebKit" name: "WebKit"
version: "605.1.15" version: "605.1.15"
- ua: "Mozilla/5.0 (iPhone; CPU iPhone OS 8_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Mobile/12D508"
spec:
browser:
name: "Safari"
webview: true
os:
name: "iOS"
version: "8.2"
platform:
type: "mobile"
vendor: "Apple"
model: "iPhone"
engine:
name: "WebKit"
version: "600.1.4"
Internet Explorer: Internet Explorer:
- -
ua: "Mozilla/5.0 (Windows NT 6.3; Win64; x64; Trident/7.0; MAARJS; rv:11.0) like Gecko" ua: "Mozilla/5.0 (Windows NT 6.3; Win64; x64; Trident/7.0; MAARJS; rv:11.0) like Gecko"