From 5d082f406c4cec66ec7c80b37f1c304e837380de Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Sun, 9 Dec 2018 01:36:30 +0100 Subject: [PATCH] =?UTF-8?q?Tabitem=20=E2=80=94=20updated=20to=20include=20?= =?UTF-8?q?color=20tag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/lib/libghettoui/popup/TabItem.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/lib/libghettoui/popup/TabItem.js b/js/lib/libghettoui/popup/TabItem.js index 99d0272..609fcb4 100644 --- a/js/lib/libghettoui/popup/TabItem.js +++ b/js/lib/libghettoui/popup/TabItem.js @@ -1,11 +1,15 @@ class TabItem extends BaseElement { - constructor (id, name, label, isIframe, onClick, additionalClasses) { + constructor (id, name, label, isIframe, onClick, badge, additionalClasses) { + if (badge) { + label = `
${badge.name}
${label}`; + } super(id, label, onClick, additionalClasses); this.element.classList.add('tabitem'); if (isIframe) { this.element.classList.add('tabitem-iframe'); } + this.name = name; }