diff --git a/src/ui/menu.js b/src/ui/menu.js index a7ecb05d..a7fe0e49 100644 --- a/src/ui/menu.js +++ b/src/ui/menu.js @@ -2,6 +2,8 @@ var FFZ = window.FrankerFaceZ, constants = require('../constants'), utils = require('../utils'), + reported_sets = [], + fix_menu_position = function(container) { var swapped = document.body.classList.contains('ffz-sidebar-swap') && ! document.body.classList.contains('ffz-portrait'); @@ -540,6 +542,8 @@ FFZ.menu_pages.channel = { header.innerHTML = 'TwitchSubscriber Emoticons'; grid.appendChild(header); + var known_sets = []; + for(var emotes=product.get("emoticons") || [], i=0; i < emotes.length; i++) { var emote = emotes[i]; if ( emote.state !== "active" ) @@ -551,6 +555,9 @@ FFZ.menu_pages.channel = { s.className = 'emoticon ffz-tooltip ffz-tooltip-no-credit' + (!can_use ? " locked" : ""); + if ( known_sets.indexOf(emote.emoticon_set) === -1 ) + known_sets.push(emote.emoticon_set); + if ( emote.emoticon_set ) { var favs = this.settings.favorite_emotes["twitch-" + emote.emoticon_set]; s.classList.add('ffz-can-favorite'); @@ -583,6 +590,13 @@ FFZ.menu_pages.channel = { c++; } + if ( reported_sets.indexOf(product.get('id')) === -1 && known_sets.length ) { + reported_sets.push(product.get('id')); + this.log("Sets for " + product.get('id') + " [" + product.get('ticketProductId') + "]: " + JSON.stringify(known_sets)); + this.ws_send("report_twitch_set", [product.get('id'), product.get('ticketProductId'), known_sets]); + } + + if ( c > 0 ) inner.appendChild(grid); diff --git a/style.css b/style.css index 6d7fe654..1ad464cd 100644 --- a/style.css +++ b/style.css @@ -533,7 +533,7 @@ body:not(.ffz-minimal-chat-input):not(.ffz-menu-replace) .chat-interface .emotic -ms-user-select: none; } -.emoticon-selector .emoticon-grid.ffz-no-emotes { +.ffz-ui-sub-menu-page[data-page="favorites"] .emoticon-grid.ffz-no-emotes { padding: 10px 20px; }