Bubble Message

【使用前先看介绍/有问题可反馈】气泡信息 (Bubble Message):能够生成悬浮气泡通知,支持自定义 icon 颜色、文字信息、淡入淡出时间、显示时间,气泡宽度。

As of 08.03.2021. See апошняя версія.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Аўтар
kalila-cc
Рэйтынг
0 0 0
Версія
0.1.2
Створаны
08.03.2021
Абноўлены
08.03.2021
Памер
4.1 КБ
Ліцэнзія
Н/Д
Ужываецца на
Усе сайты

气泡信息 (Bubble Message)

生成悬浮气泡通知,支持自定义 icon 颜色、文字信息、淡入淡出时间、显示时间,气泡宽度。

使用方法

// 新建气泡信息对象
let bm = new BubbleMessage()
// 生成气泡信息
bm.message({
  type: 'info', // 支持'info|warning|error|success',默认为'info'
  message: 'This is a message', // 自定义文字信息,默认为''
  duration: 2000, // 自定义显示时间,默认为1500 ms
})
// 自定义 icon 颜色
bm.config.cmap.info = '#909399' // 'info' 的 icon 颜色默认为 '#909399'
// 自定义淡入淡出时间
bm.config.fadeInTime = 0.4 // 默认为 0.4 s
bm.config.fadeOutTime = 0.6 // 默认为 0.6 s
bm.width = 240 // 默认气泡宽度为 240 px

作者想说

欢迎关注作者的GitHub主页,通过主页,你可以:

  • 了解本人的更多作品。
  • 对代码或程序提出任何意见或建议。
  • 联系作者。