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

Merge pull request #363 from navarroaxel/feat/gsa

feat(browsers): Add Google Search App detection
This commit is contained in:
Denis Demchenko 2019-10-02 21:26:25 +03:00 committed by GitHub
commit 0ce5a8173a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 0 deletions

View File

@ -11,6 +11,7 @@ export const BROWSER_ALIASES_MAP = {
Firefox: 'firefox',
Focus: 'focus',
Generic: 'generic',
'Google Search': 'google_search',
Googlebot: 'googlebot',
'Internet Explorer': 'ie',
'K-Meleon': 'k_meleon',
@ -52,6 +53,7 @@ export const BROWSER_MAP = {
focus: 'Focus',
generic: 'Generic',
googlebot: 'Googlebot',
google_search: 'Google Search',
ie: 'Internet Explorer',
k_meleon: 'K-Meleon',
maxthon: 'Maxthon',

View File

@ -561,6 +561,21 @@ const browsersList = [
return browser;
},
},
{
test: [/GSA/i],
describe(ua) {
const browser = {
name: 'Google Search',
};
const version = Utils.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i, ua);
if (version) {
browser.version = version;
}
return browser;
},
},
/* Android Browser */
{

View File

@ -336,6 +336,23 @@
type: "tv"
engine:
name: "Blink"
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"
spec:
browser:
name: "Google Search"
version: "83.0.268992909"
os:
name: "iOS"
version: "12.4"
platform:
type: "mobile"
vendor: "Apple"
model: "iPhone"
engine:
name: "WebKit"
version: "605.1.15"
Amazon Silk:
-
ua: "Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; KFTT Build/IML74K) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.4 Mobile Safari/535.19 Silk-Accelerated=true"