Bubble Message

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

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

Autore
kalila-cc
Installazioni giornaliere
0
Installazioni totali
14
Valutazione
0 0 0
Versione
0.2.4
Creato il
08/03/2021
Aggiornato il
23/04/2021
Dimensione
5,54 KB
Licenza
Non disponibile
Applica a
Tutti i siti

气泡信息 (Bubble Message)

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

观前提示

  • Greasy Fork 的脚本需要安装油猴(即 Tampermonkey ,一个用于脚本管理的插件)后才能使用
  • 若你当前使用的浏览器没有安装油猴,请前往安装后再回到该页面
  • 另外,推荐尽可能使用 Chrome 浏览器,因为脚本通常都会适配 Chrome 浏览器,而其他浏览器则不一定能够正常运行脚本

脚本引入

<script src="https://greasyfork.org/scripts/422854-bubble-message.js"></script>

使用方法

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

作者想说

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

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