Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update unread pattern #204

Merged
merged 1 commit into from
May 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: '' })
}
}
}
Loading