H2P: notify util

通知栏

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://greasyfork.org/scripts/411280-h2p-notify-util/code/H2P:%20notify%20util.js?version=847422

Author
Greasy丶H2P
Ratings
0 0 0
Version
0.1.0
Created
Updated
Compatibility
Compatible with Chrome
License
N/A
Applies to
All sites

1. 引入脚本

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

2. 传入 notifyMgr

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

3. 使用脚本

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

  $notifyMgr.closeNotify(id = '');