javascript - 如何从桌面通知中覆盖或删除签名“electron.app.Electron”
问题描述
我正在尝试删除或覆盖我由电子制作的通知签名。
我正在尝试覆盖签名electron.app.Electron还是完全删除它npm run start
,因为我知道我已经在测试模式 ( .exe
,但没有一个是非常不愉快的。
我当前的通知代码如下:
function showNotification() {
const notification = new Notification("new message", {
body: "app launched",
icon: __dirname + '/icon.ico',
tag: 'soManyNotification',
hasReply: true
})
}
console.log(Notification.permission)
if (Notification.permission === "granted") {
showNotification()
//alert('we have permission');
} else if (Notification.permission === "denied") {
Notification.requestPermission()
};
任何帮助将不胜感激^^
解决方案
// If this is running on Windows then set UserModelID for notification
if (isWin()) {
app.setAppUserModelId("Proper name to be replaced");
}
推荐阅读
- sql-server - 我可以为外部数据查询创建日期范围参数,特别是对于 JOIN SQL 查询(数据不是来自一个表)吗?
- overlay - KML 到 Foreflight 导入 - 更改图标
- java - CardView onClickListener 去另一个意图
- android - 为什么当我尝试从回收视图中搜索某些内容时,我的数据会重复?
- jquery - 查询所有元素的字段值相同的子文档数组
- nltk - WordNetLemmatizer 不在文本数据中进行词形还原
- reactjs - Feathers:为两个不同的查询自定义 find()
- css - 防止悬停在绝对定位的孩子上传播给父母
- pdf - 如何使用 Ghostscript 为旧版 Kindle 预处理 pdf?
- java - 如何一一获取arraylist值并将其放入stringbuilder java中?