Greasy Fork is available in English.

H2P: notify util

通知栏

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.greasyfork.org/scripts/411280/847422/H2P%3A%20notify%20util.js

作者
Greasy丶H2P
版本
0.1.0
建立日期
2020-09-13
更新日期
2020-09-13
授權條款
未知

1. 引入脚本

根据 greasyFork 指引,到脚本开头 require 本脚本

2. 传入 notifyMgr

  (($notifyMgr) => {
    ...
  })($notifyMgr)

3. 使用脚本

  // 会返回创建的弹窗的 id
  $notifyMgr.createNotify({ msg = '', type = notifyType.default, autoClose = true });

  $notifyMgr.closeNotify(id = '');