diff --git a/src/ffzap-bttv/index.js b/src/ffzap-bttv/index.js index 114f87b..33e34a9 100644 --- a/src/ffzap-bttv/index.js +++ b/src/ffzap-bttv/index.js @@ -112,6 +112,11 @@ class BetterTTV extends Addon { onEnable() { this.log.debug('FFZ:AP\'s BetterTTV Emotes module was enabled successfully.'); + this.emotes.setProvider('addon--ffzap.betterttv', { + name: this.addon_manifest.name, + icon: this.addon_manifest.icon, + }); + this.on('chat:room-add', this.roomAdd); this.on('chat:room-remove', this.roomRemove); this.on('chat:receive-message', this.onReceiveMessage); @@ -264,11 +269,11 @@ class BetterTTV extends Addon { } addProBadge() { - this.removeProBadge(); + const wanted = this.chat.context.get('ffzap.betterttv.pro_badges') && ! window.BetterTTV; - if (!this.chat.context.get('ffzap.betterttv.pro_badges')) return; - - if (window.BetterTTV) return; + this.removeProBadge(!wanted); + if (!wanted) + return; const badgeData = { id: `bttv-pro`, @@ -281,9 +286,9 @@ class BetterTTV extends Addon { this.badges.loadBadgeData(this.getProBadgeID(), badgeData); } - removeProBadge() { + removeProBadge(generate_css = true) { this.badges.deleteBulk('addon.ffzap-bttv', this.getProBadgeID()); - delete this.badges.badges[this.getProBadgeID()]; + this.badges.removeBadge(this.getProBadgeID(), generate_css); } async addBadges(attempts = 0) { diff --git a/src/ffzap-bttv/manifest.json b/src/ffzap-bttv/manifest.json index a88f4c1..42a0c86 100644 --- a/src/ffzap-bttv/manifest.json +++ b/src/ffzap-bttv/manifest.json @@ -10,7 +10,7 @@ "load_events": [ "chat-data" ], - "version": "3.3.22", + "version": "3.3.23", "short_name": "FFZ:AP BTTV", "name": "BetterTTV Emotes", "author": "Lordmau5", @@ -18,5 +18,5 @@ "website": "https://betterttv.com/", "settings": "add_ons.better_ttv_emotes", "created": "2019-09-12T15:31:59.000Z", - "updated": "2024-10-24T18:38:50.471Z" + "updated": "2024-12-03T21:23:02.654Z" } \ No newline at end of file