1
0
mirror of https://github.com/lancedikson/bowser synced 2026-03-02 03:40:27 +00:00

add support for googlebot detection

This commit is contained in:
Andrew Shaffer
2015-02-27 15:20:55 -08:00
parent 5a3d3766b9
commit 3c755ed710
4 changed files with 22 additions and 1 deletions

View File

@@ -142,6 +142,13 @@
, version: versionIdentifier
}
}
else if(/googlebot/i.test(ua)) {
result = {
name: 'Googlebot'
, googlebot: t
, version: getFirstMatch(/googlebot\/(\d+(\.\d+))/i) || versionIdentifier
}
}
else result = {}
// set webkit or gecko flag for browsers based on these engines