addon.badge

Available in userscripts
Available in persistent scripts ✔️
Available in popup 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 12 July 2021 by Hans5958 on commit d07183b. Improve this page.