1
0
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:
Jam Hsu
2026-02-01 00:54:09 +08:00
committed by GitHub
parent 0f51d8bce8
commit 74463f6b23
4 changed files with 64 additions and 0 deletions

View File

@@ -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],