This repository has been archived by the owner on Mar 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
通过 hack html5 的 Notification 接口,将网页端的通知消息拦截并发送到 main.js,之后由 electron 侧重新发起一个消息通知,以便支持点击消息之后的回调
- Loading branch information
Showing
1 changed file
with
64 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f8c4781
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the
window.Notification
intercepts is awesome!f8c4781
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I borrowed the idea here to my lark-gtk implements.
this hack will allow auto switch to the target group or person message area:
the
channel_id
is from the Notificationopts
'schannel_id
field