一个使用 通知 事件的例子
一个使用
检测到达美乐披萨中一等奖的通知时 再大力通知
Surge 配置
通知 事件的例子检测到达美乐披萨中一等奖的通知时 再大力通知
Surge 配置
[Script]
Notification = script-path=notification.js,type=event,event-name=notificationjavascript
// console.log(JSON.stringify($event, null, 2))
const { name, data: { title, subtitle, body } } = $event
if (/达乐美|达美乐/.test(title) && /一等奖/.test(body)) {
$notification.post(`🎉 一等奖!!! ${title}`, subtitle, body, { 'media-url': 'https://www.dominos.com.cn/assets/img/logo.a75b8846.png', sound: 1 })
}
$done()
新版不能在此事件脚本里再发通知了 可改为 HTTP 请求 Bark 之类的:

#Surge #模块 #脚本 #通知 #配置 #示例 #达美乐 #达乐美