addon.badge

Available in userscripts
Available in persistent scripts ✔️
Required manifest permissions badge

Note: currently only one addon (msg-count-badge) can use this API. Do not use it in your addon without discussing on GitHub first.

Description

Allows addons to display a badge, a bit of text that is layered over the extension icon, frequently a number.

Getters & setters

addon.badge.text

Text shown on the badge.
Numbers are automatically converted to strings.
If this is set to "", null or 0, the badge will be hidden.

addon.badge.color

Color of the badge.
Accepts any CSS supported color.


Last updated at 25 May 2021 by World_Languages on commit e329d03. Improve this page.