mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-22 23:16:48 +00:00
评论 插件相关
This commit is contained in:
@@ -27,16 +27,9 @@ export const shuffleArray = array => {
|
||||
* google机器人
|
||||
* @returns
|
||||
*/
|
||||
export const isSearchEngineBot = () => {
|
||||
if (typeof navigator === 'undefined') {
|
||||
return false
|
||||
}
|
||||
// 获取用户代理字符串
|
||||
const userAgent = navigator.userAgent
|
||||
// 使用正则表达式检测是否包含搜索引擎爬虫关键字
|
||||
return /Googlebot|bingbot|Baidu/.test(userAgent)
|
||||
}
|
||||
|
||||
export const isSearchEngineBot =
|
||||
typeof navigator !== 'undefined' &&
|
||||
/Googlebot|bingbot|Baidu/.test(navigator.userAgent)
|
||||
/**
|
||||
* 组件持久化
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user