1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-06 06:10:54 +00:00

Sort emoticons. Added a bot.

This commit is contained in:
SirStendec 2015-02-27 12:33:13 -05:00
parent 41c93f613e
commit 0aec86a4d8
4 changed files with 34 additions and 10 deletions

View file

@ -106,8 +106,20 @@ FFZ.menu_pages.my_emotes = {
if ( ! data.emoticon_sets.hasOwnProperty(set_id) )
continue;
var set = f._twitch_emote_sets[set_id] = f._twitch_emote_sets[set_id] || {};
set.emotes = data.emoticon_sets[set_id];
var set = f._twitch_emote_sets[set_id] = f._twitch_emote_sets[set_id] || {},
emotes = data.emoticon_sets[set_id];
// Sort Emoticons
emotes.sort(function(a,b) {
var a = (KNOWN_CODES[a.code] ? "000" + KNOWN_CODES[a.code] : a.code).toLowerCase(),
b = (KNOWN_CODES[b.code] ? "000" + KNOWN_CODES[b.code] : b.code).toLowerCase();
if ( a < b ) return -1;
else if ( a > b ) return 1;
return 0;
});
set.emotes = emotes;
set.source = "Twitch";
}
}