@aabuhijleh/windows-notification-state 中文文档教程

发布于 5年前 浏览 27 项目主页 更新于 3年前

windows-notification-state

SHQueryUserNotificationState,作为本机 Node 插件实现。 如果您正在寻找一个简单的解决方案来检查您是否应该向您的用户发送通知,就是这样。

npm install windows-notification-state
const { shQueryUserNotificationState, getNotificationState } = require('windows-notification-state`)

// This will print a number (corresponding with QUERY_USER_NOTIFICATION_STATE)
console.log(shQueryUserNotificationState())

// If you prefer your code to be more readable, you can use the string-based variant.
// This will print the name of the enum (so "QUNS_ACCEPTS_NOTIFICATIONS" instead of 5)
console.log(getNotificationState())

License

麻省理工学院,详情请参阅许可证。 版权所有 (c) 2017 Felix Rieseberg。

windows-notification-state

SHQueryUserNotificationState, implemented as a native Node addon. If you're looking for a simple solution to check whether or not you should send your user a notification, this is it.

npm install windows-notification-state
const { shQueryUserNotificationState, getNotificationState } = require('windows-notification-state`)

// This will print a number (corresponding with QUERY_USER_NOTIFICATION_STATE)
console.log(shQueryUserNotificationState())

// If you prefer your code to be more readable, you can use the string-based variant.
// This will print the name of the enum (so "QUNS_ACCEPTS_NOTIFICATIONS" instead of 5)
console.log(getNotificationState())

License

MIT, please see LICENSE for details. Copyright (c) 2017 Felix Rieseberg.

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文