mirror of
https://github.com/lancedikson/bowser
synced 2026-09-23 12:34:58 +00:00
feat: Add Slack bot detection (#596)
Co-authored-by: Jam <jam.hsu@lativ.com.tw>
This commit is contained in:
@@ -361,6 +361,23 @@ const browsersList = [
|
||||
},
|
||||
},
|
||||
|
||||
/* SlackBot */
|
||||
{
|
||||
test: [/slackbot/i, /slack-imgProxy/i],
|
||||
describe(ua) {
|
||||
const browser = {
|
||||
name: 'SlackBot',
|
||||
};
|
||||
const version = Utils.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
|
||||
|
||||
if (version) {
|
||||
browser.version = version;
|
||||
}
|
||||
|
||||
return browser;
|
||||
},
|
||||
},
|
||||
|
||||
/* YahooSlurp */
|
||||
{
|
||||
test: [/yahoo!?[\s/]*slurp/i],
|
||||
|
||||
Reference in New Issue
Block a user