Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

能否加个系统通知? #20

Open
zhuhaiva opened this issue Sep 19, 2023 · 1 comment
Open

能否加个系统通知? #20

zhuhaiva opened this issue Sep 19, 2023 · 1 comment

Comments

@zhuhaiva
Copy link

if(window.Notification && Notification.permission !== "denied") {
Notification.requestPermission(function(status) { // 请求权限
if(status === 'granted') {
// 弹出一个通知
var n = new Notification('到货通知', {
body : '抢到啦抢到啦',
});
}
});
}
这样可以浏览器退到后台

@Seiyaohari
Copy link

作者新版增加了消息推送功能,可以配备bark或者server酱推送到手机

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants