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:
@@ -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
|
||||
|
||||
@@ -931,4 +931,11 @@ module.exports.useragents = {
|
||||
, x: true
|
||||
}
|
||||
}
|
||||
, Googlebot: {
|
||||
'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)': {
|
||||
googlebot: true
|
||||
, version: '2.1'
|
||||
, x: true
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user