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

View File

@ -561,6 +561,21 @@ const browsersList = [
return browser; 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 */ /* Android Browser */
{ {

View File

@ -336,6 +336,23 @@
type: "tv" type: "tv"
engine: engine:
name: "Blink" 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: 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" 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"