Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/mumuy/browser
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenghaole committed Nov 11, 2024
2 parents 3ba90f6 + 92fa398 commit f8fad23
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ console.log('[浏览器指纹]',data.value);
<tr><td>OnePlus</td><td>一加浏览器</td></tr>
<tr><td>Samsung</td><td>三星浏览器</td></tr>
<tr><td>Lenovo</td><td>联想浏览器</td></tr>
<tr><td rowspan="12">客户端</td><td>QQ</td><td>QQ客户端</td></tr>
<tr><td rowspan="13">客户端</td><td>QQ</td><td>QQ客户端</td></tr>
<tr><td>Wechat</td><td>微信手机客户端</td></tr>
<tr><td>WechatWork</td><td>企业微信客户端</td></tr>
<tr><td>Taobao</td><td>淘宝手机客户端</td></tr>
Expand All @@ -139,6 +139,7 @@ console.log('[浏览器指纹]',data.value);
<tr><td>DingTalk</td><td>钉钉手机客户端</td></tr>
<tr><td>Douyin</td><td>抖音客户端</td></tr>
<tr><td>Toutiao</td><td>头条客户端</td></tr>
<tr><td>Facebook</td><td>Facebook客户端</td></tr>
<tr><td rowspan="9">爬虫</td><td>Googlebot</td><td>谷歌爬虫</td></tr>
<tr><td>Baiduspider</td><td>百度爬虫</td></tr>
<tr><td>Sogouspider</td><td>搜狗爬虫</td></tr>
Expand Down
2 changes: 1 addition & 1 deletion dist/browser.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/browser.min.mjs

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/module/browser-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ import _Suning from './browser/Suning.js';
import _iQIYI from './browser/iQIYI.js';
import _DingTalk from './browser/DingTalk.js';
import _Douyin from './browser/Douyin.js';
import _Facebook from './browser/Facebook.js';
import _Googlebot from './browser/Googlebot.js';
import _Baiduspider from './browser/Baiduspider.js';
import _Sogouspider from './browser/Sogouspider.js';
Expand All @@ -78,7 +79,7 @@ import _KHTML from './engine/KHTML.js';

import userAgent from './runtime/userAgent.js';

let browserList = [_Safari, _Chrome, _Edge, _IE, _Firefox, _Firefox_Focus, _Chromium, _Opera, _Opera_GX, _Vivaldi, _Yandex, _Brave, _Arora, _Lunascape, _QupZilla, _Coc_Coc, _Kindle, _Iceweasel, _Konqueror, _SeaMonkey, _Epiphany, _Huawei, _OPPO, _Vivo, _Xiaomi, _Meizu, _OnePlus, _Samsung, _360, _360EE, _360SE, _360EE_macOS, _360AI, _360AI_macOS, _360ENT, _UC, _QQBrowser, _QQ, _Baidu, _Maxthon, _Sogou, _Liebao, _2345Explorer, _115Browser, _TheWorld, _Quark, _Qiyu, _Lenovo, _Wechat, _WechatWork, _Taobao, _Alipay, _Weibo, _Douban, _Suning, _iQIYI, _DingTalk, _Douyin, _Toutiao, _Googlebot, _Baiduspider, _Sogouspider, _Bingbot, _360Spider, _Bytespider, _YisouSpider, _YodaoBot, _YandexBot, _Headless];
let browserList = [_Safari, _Chrome, _Edge, _IE, _Firefox, _Firefox_Focus, _Chromium, _Opera, _Opera_GX, _Vivaldi, _Yandex, _Brave, _Arora, _Lunascape, _QupZilla, _Coc_Coc, _Kindle, _Iceweasel, _Konqueror, _SeaMonkey, _Epiphany, _Huawei, _OPPO, _Vivo, _Xiaomi, _Meizu, _OnePlus, _Samsung, _360, _360EE, _360SE, _360EE_macOS, _360AI, _360AI_macOS, _360ENT, _UC, _QQBrowser, _QQ, _Baidu, _Maxthon, _Sogou, _Liebao, _2345Explorer, _115Browser, _TheWorld, _Quark, _Qiyu, _Lenovo, _Wechat, _WechatWork, _Taobao, _Alipay, _Weibo, _Douban, _Suning, _iQIYI, _DingTalk, _Douyin, _Toutiao, _Facebook, _Googlebot, _Baiduspider, _Sogouspider, _Bingbot, _360Spider, _Bytespider, _YisouSpider, _YodaoBot, _YandexBot, _Headless];
browserList.forEach(item=>{
if(!item.is){
item.is = async function(){
Expand Down
11 changes: 11 additions & 0 deletions src/module/browser/Facebook.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import userAgent from '../runtime/userAgent.js';

export default {
name:'Facebook',
parse(ua = userAgent){
return {
is:ua.includes('Facebook')||ua.includes('FBAV/'),
version:ua.match(/FBAV\/([\d.]+)/)?.[1]||''
};
}
}

0 comments on commit f8fad23

Please sign in to comment.