Skip to content

Commit

Permalink
Merge pull request #204 from ViggoC/patch-1
Browse files Browse the repository at this point in the history
update unread pattern
  • Loading branch information
p0we7 authored May 15, 2024
2 parents 768caf8 + 570009b commit 8178226
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions background/notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async function checkMsg() {
console.log('开始检查未读消息')
let rep = await fetch('https://www.v2ex.com/mission')
let text = await rep.text()
let sign = RegExp("([0-9]*?) (条未读提醒|unread)").exec(text)
let sign = RegExp("([0-9]*?) (未读提醒|unread)").exec(text)
sign = sign != null && sign[1] || "未登录"
if (sign == "未登录") {
chrome.action.setIcon({ path: "icon/icon38_nologin.png" })
Expand All @@ -39,4 +39,4 @@ async function checkMsg() {
chrome.action.setIcon({ path: "icon/icon38.png" })
chrome.action.setBadgeText({ text: '' })
}
}
}

0 comments on commit 8178226

Please sign in to comment.