2015-01-20 01:53:18 -05:00
|
|
|
var FFZ = window.FrankerFaceZ,
|
|
|
|
CSS = /\.([\w\-_]+)\s*?\{content:\s*?"([^"]+)";\s*?background-image:\s*?url\("([^"]+)"\);\s*?height:\s*?(\d+)px;\s*?width:\s*?(\d+)px;\s*?margin:([^;}]+);?([^}]*)\}/mg,
|
|
|
|
MOD_CSS = /[^\n}]*\.badges\s+\.moderator\s*{\s*background-image:\s*url\(\s*['"]([^'"]+)['"][^}]+(?:}|$)/,
|
|
|
|
constants = require('./constants'),
|
|
|
|
utils = require('./utils'),
|
|
|
|
|
2015-10-24 22:44:00 -04:00
|
|
|
build_css = function(emote) {
|
2015-06-05 03:59:28 -04:00
|
|
|
if ( ! emote.margins && ! emote.css )
|
2015-11-14 23:52:49 -05:00
|
|
|
return "";
|
2015-01-20 01:53:18 -05:00
|
|
|
|
2016-04-11 18:57:25 -04:00
|
|
|
return 'img[data-ffz-emote="' + emote.id + '"] { ' + (emote.margins ? "margin: " + emote.margins + ";" : "") + (emote.css || "") + " }\n";
|
2015-07-06 00:09:21 -04:00
|
|
|
};
|
2015-01-20 01:53:18 -05:00
|
|
|
|
|
|
|
|
|
|
|
// ---------------------
|
|
|
|
// Initialization
|
|
|
|
// ---------------------
|
|
|
|
|
|
|
|
FFZ.prototype.setup_emoticons = function() {
|
|
|
|
this.log("Preparing emoticon system.");
|
|
|
|
|
2015-07-04 17:06:36 -04:00
|
|
|
this.emoji_data = {};
|
2015-07-06 00:09:21 -04:00
|
|
|
this.emoji_names = {};
|
|
|
|
|
2015-01-20 01:53:18 -05:00
|
|
|
this.emote_sets = {};
|
|
|
|
this.global_sets = [];
|
2015-06-05 03:59:28 -04:00
|
|
|
this.default_sets = [];
|
2015-01-20 01:53:18 -05:00
|
|
|
this._last_emote_id = 0;
|
|
|
|
|
2015-06-05 03:59:28 -04:00
|
|
|
// Usage Data
|
|
|
|
this.emote_usage = {};
|
|
|
|
|
|
|
|
|
2015-01-20 01:53:18 -05:00
|
|
|
this.log("Creating emoticon style element.");
|
|
|
|
var s = this._emote_style = document.createElement('style');
|
|
|
|
s.id = "ffz-emoticon-css";
|
|
|
|
document.head.appendChild(s);
|
|
|
|
|
2015-06-05 03:59:28 -04:00
|
|
|
this.log("Loading global emote sets.");
|
|
|
|
this.load_global_sets();
|
|
|
|
|
2015-07-04 17:06:36 -04:00
|
|
|
this.log("Loading emoji data.");
|
|
|
|
this.load_emoji_data();
|
|
|
|
|
2015-06-05 03:59:28 -04:00
|
|
|
this.log("Watching Twitch emoticon parser to ensure it loads.");
|
|
|
|
this._twitch_emote_check = setTimeout(this.check_twitch_emotes.bind(this), 10000);
|
2015-10-24 22:44:00 -04:00
|
|
|
|
|
|
|
|
|
|
|
if ( this._apis ) {
|
|
|
|
for(var api_id in this._apis) {
|
|
|
|
var api = this._apis[api_id];
|
|
|
|
for(var es_id in api.emote_sets)
|
|
|
|
this.emote_sets[es_id] = api.emote_sets[es_id];
|
|
|
|
|
|
|
|
for(var i=0; i < api.global_sets.length; i++) {
|
|
|
|
var es_id = api.global_sets[i];
|
|
|
|
if ( this.global_sets.indexOf(es_id) === -1 )
|
|
|
|
this.global_sets.push(es_id);
|
|
|
|
}
|
|
|
|
|
|
|
|
for(var i=0; i < api.default_sets.length; i++) {
|
|
|
|
var es_id = api.default_sets[i];
|
|
|
|
if ( this.default_sets.indexOf(es_id) === -1 )
|
|
|
|
this.default_sets.push(es_id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-06-05 03:59:28 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ------------------------
|
|
|
|
// Emote Usage
|
|
|
|
// ------------------------
|
|
|
|
|
2015-11-14 23:52:49 -05:00
|
|
|
FFZ.prototype.add_usage = function(room_id, emote, count) {
|
|
|
|
// Only report usage from FFZ emotes. Not extensions to FFZ.
|
|
|
|
var emote_set = this.emote_sets[emote.set_id];
|
|
|
|
if ( ! emote_set || emote_set.source_ext )
|
|
|
|
return;
|
|
|
|
|
|
|
|
var emote_id = emote.id,
|
|
|
|
rooms = this.emote_usage[emote_id] = this.emote_usage[emote_id] || {};
|
|
|
|
|
2015-06-05 03:59:28 -04:00
|
|
|
rooms[room_id] = (rooms[room_id] || 0) + (count || 1);
|
|
|
|
|
|
|
|
if ( this._emote_report_scheduled )
|
|
|
|
return;
|
|
|
|
|
|
|
|
this._emote_report_scheduled = setTimeout(this._report_emotes.bind(this), 30000);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
FFZ.prototype._report_emotes = function() {
|
|
|
|
if ( this._emote_report_scheduled )
|
|
|
|
delete this._emote_report_scheduled;
|
|
|
|
|
|
|
|
var usage = this.emote_usage;
|
|
|
|
this.emote_usage = {};
|
|
|
|
this.ws_send("emoticon_uses", [usage], function(){}, true);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-11-07 22:56:15 -05:00
|
|
|
// ------------------------
|
|
|
|
// Emote Click Handler
|
|
|
|
// ------------------------
|
|
|
|
|
|
|
|
FFZ.prototype._click_emote = function(target, event) {
|
|
|
|
if ( ! this.settings.clickable_emoticons || (event && !((event.shiftKey || event.shiftLeft) && target && target.classList.contains('emoticon'))) )
|
|
|
|
return;
|
|
|
|
|
|
|
|
var eid = target.getAttribute('data-emote');
|
|
|
|
if ( eid )
|
|
|
|
window.open("https://twitchemotes.com/emote/" + eid);
|
|
|
|
else {
|
|
|
|
eid = target.getAttribute("data-ffz-emote");
|
|
|
|
var es = target.getAttribute("data-ffz-set"),
|
|
|
|
emote_set = es && this.emote_sets[es],
|
|
|
|
url;
|
|
|
|
|
|
|
|
if ( ! emote_set )
|
|
|
|
return;
|
|
|
|
|
|
|
|
if ( emote_set.hasOwnProperty('source_ext') ) {
|
|
|
|
var api = this._apis[emote_set.source_ext];
|
|
|
|
if ( api && api.emote_url_generator )
|
|
|
|
url = api.emote_url_generator(emote_set.source_id, eid);
|
|
|
|
} else
|
|
|
|
url = "https://www.frankerfacez.com/emoticons/" + eid;
|
|
|
|
|
|
|
|
if ( url ) {
|
|
|
|
window.open(url);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-06-05 03:59:28 -04:00
|
|
|
// ------------------------
|
|
|
|
// Twitch Emoticon Checker
|
|
|
|
// ------------------------
|
|
|
|
|
|
|
|
FFZ.prototype.check_twitch_emotes = function() {
|
|
|
|
if ( this._twitch_emote_check ) {
|
|
|
|
clearTimeout(this._twitch_emote_check);
|
|
|
|
delete this._twitch_emote_check;
|
|
|
|
}
|
|
|
|
|
|
|
|
var room;
|
|
|
|
if ( this.rooms ) {
|
|
|
|
for(var key in this.rooms) {
|
|
|
|
if ( this.rooms.hasOwnProperty(key) ) {
|
|
|
|
room = this.rooms[key];
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( ! room || ! room.room || ! room.room.tmiSession ) {
|
|
|
|
this._twitch_emote_check = setTimeout(this.check_twitch_emotes.bind(this), 10000);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
var parser = room.room.tmiSession._emotesParser,
|
|
|
|
emotes = Object.keys(parser.emoticonRegexToIds).length;
|
|
|
|
|
|
|
|
// If we have emotes, we're done!
|
|
|
|
if ( emotes > 0 )
|
|
|
|
return;
|
|
|
|
|
|
|
|
// No emotes. Try loading them.
|
|
|
|
var sets = parser.emoticonSetIds;
|
|
|
|
parser.emoticonSetIds = "";
|
|
|
|
parser.updateEmoticons(sets);
|
|
|
|
|
|
|
|
// Check again in a bit to see if we've got them.
|
|
|
|
this._twitch_emote_check = setTimeout(this.check_twitch_emotes.bind(this), 10000);
|
2015-01-20 01:53:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-06-05 03:59:28 -04:00
|
|
|
|
2015-01-20 01:53:18 -05:00
|
|
|
// ---------------------
|
|
|
|
// Set Management
|
|
|
|
// ---------------------
|
|
|
|
|
|
|
|
FFZ.prototype.getEmotes = function(user_id, room_id) {
|
2015-06-05 03:59:28 -04:00
|
|
|
var user = this.users && this.users[user_id],
|
|
|
|
room = this.rooms && this.rooms[room_id];
|
2015-01-20 01:53:18 -05:00
|
|
|
|
2015-10-24 22:44:00 -04:00
|
|
|
return _.union(user && user.sets || [], room && room.set && [room.set] || [], room && room.extra_sets || [], room && room.ext_sets || [], this.default_sets);
|
2015-01-20 01:53:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ---------------------
|
|
|
|
// Commands
|
|
|
|
// ---------------------
|
|
|
|
|
|
|
|
FFZ.ws_commands.reload_set = function(set_id) {
|
2015-06-05 03:59:28 -04:00
|
|
|
if ( this.emote_sets.hasOwnProperty(set_id) )
|
|
|
|
this.load_set(set_id);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
FFZ.ws_commands.load_set = function(set_id) {
|
2015-01-20 01:53:18 -05:00
|
|
|
this.load_set(set_id);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-07-04 17:06:36 -04:00
|
|
|
// ---------------------
|
|
|
|
// Emoji Loading
|
|
|
|
// ---------------------
|
|
|
|
|
|
|
|
FFZ.prototype.load_emoji_data = function(callback, tries) {
|
2016-08-09 20:45:28 -04:00
|
|
|
var f = this,
|
|
|
|
puny = window.punycode && punycode.ucs2;
|
|
|
|
|
2015-08-28 22:54:12 -04:00
|
|
|
jQuery.getJSON(constants.SERVER + "emoji/emoji-data.json")
|
2015-07-04 17:06:36 -04:00
|
|
|
.done(function(data) {
|
2015-07-06 00:09:21 -04:00
|
|
|
var new_data = {},
|
|
|
|
by_name = {};
|
2015-07-04 17:06:36 -04:00
|
|
|
for(var eid in data) {
|
|
|
|
var emoji = data[eid];
|
|
|
|
eid = eid.toLowerCase();
|
2015-07-06 00:09:21 -04:00
|
|
|
emoji.code = eid;
|
2015-08-28 22:54:12 -04:00
|
|
|
|
2015-07-04 17:06:36 -04:00
|
|
|
new_data[eid] = emoji;
|
2016-07-13 02:31:26 -04:00
|
|
|
if ( emoji.short_name )
|
|
|
|
by_name[emoji.short_name] = eid;
|
|
|
|
if ( emoji.names && emoji.names.length )
|
|
|
|
for(var x=0,y=emoji.names.length; x < y; x++)
|
|
|
|
by_name[emoji.names[x]] = eid;
|
2015-07-06 00:09:21 -04:00
|
|
|
|
2016-03-23 19:28:22 -04:00
|
|
|
emoji.raw = _.map(emoji.code.split("-"), utils.codepoint_to_emoji).join("");
|
2015-07-04 17:06:36 -04:00
|
|
|
|
2016-03-23 19:28:22 -04:00
|
|
|
emoji.tw_src = constants.SERVER + 'emoji/tw/' + eid + '.svg';
|
2015-08-28 22:54:12 -04:00
|
|
|
emoji.noto_src = constants.SERVER + 'emoji/noto-' + eid + '.svg';
|
2016-07-13 02:31:26 -04:00
|
|
|
emoji.one_src = constants.SERVER + 'emoji/one/' + eid + '.svg';
|
2015-07-04 17:06:36 -04:00
|
|
|
|
|
|
|
emoji.token = {
|
2016-07-13 02:31:26 -04:00
|
|
|
type: "emoticon",
|
|
|
|
imgSrc: true,
|
2015-08-28 22:54:12 -04:00
|
|
|
|
2016-08-09 20:45:28 -04:00
|
|
|
length: puny ? puny.decode(emoji.raw).length : emoji.raw.length,
|
|
|
|
|
2015-08-28 22:54:12 -04:00
|
|
|
tw_src: emoji.tw_src,
|
|
|
|
noto_src: emoji.noto_src,
|
2016-07-13 02:31:26 -04:00
|
|
|
one_src: emoji.one_src,
|
2015-08-28 22:54:12 -04:00
|
|
|
|
|
|
|
tw: emoji.tw,
|
|
|
|
noto: emoji.noto,
|
2016-07-13 02:31:26 -04:00
|
|
|
one: emoji.one,
|
2015-08-28 22:54:12 -04:00
|
|
|
|
2015-07-04 17:06:36 -04:00
|
|
|
ffzEmoji: eid,
|
2015-07-06 00:09:21 -04:00
|
|
|
altText: emoji.raw
|
2015-08-28 22:54:12 -04:00
|
|
|
};
|
2015-07-04 17:06:36 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
f.emoji_data = new_data;
|
2015-07-06 00:09:21 -04:00
|
|
|
f.emoji_names = by_name;
|
2015-08-28 22:54:12 -04:00
|
|
|
|
2015-07-04 17:06:36 -04:00
|
|
|
f.log("Loaded data on " + Object.keys(new_data).length + " emoji.");
|
|
|
|
if ( typeof callback === "function" )
|
|
|
|
callback(true, data);
|
|
|
|
|
|
|
|
}).fail(function(data) {
|
|
|
|
if ( data.status === 404 )
|
|
|
|
return typeof callback === "function" && callback(false);
|
|
|
|
|
|
|
|
tries = (tries || 0) + 1;
|
|
|
|
if ( tries < 50 )
|
|
|
|
return f.load_emoji(callback, tries);
|
|
|
|
|
|
|
|
return typeof callback === "function" && callback(false);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-01-20 01:53:18 -05:00
|
|
|
// ---------------------
|
|
|
|
// Set Loading
|
|
|
|
// ---------------------
|
|
|
|
|
2015-06-05 03:59:28 -04:00
|
|
|
FFZ.prototype.load_global_sets = function(callback, tries) {
|
|
|
|
var f = this;
|
2015-12-12 13:28:35 -05:00
|
|
|
jQuery.getJSON(constants.API_SERVER + "v1/set/global")
|
2015-06-05 03:59:28 -04:00
|
|
|
.done(function(data) {
|
|
|
|
f.default_sets = data.default_sets;
|
|
|
|
var gs = f.global_sets = [],
|
|
|
|
sets = data.sets || {};
|
|
|
|
|
2015-07-13 21:52:44 -04:00
|
|
|
if ( f.feature_friday && f.feature_friday.set ) {
|
|
|
|
if ( f.global_sets.indexOf(f.feature_friday.set) === -1 )
|
|
|
|
f.global_sets.push(f.feature_friday.set);
|
|
|
|
if ( f.default_sets.indexOf(f.feature_friday.set) === -1 )
|
|
|
|
f.default_sets.push(f.feature_friday.set);
|
|
|
|
}
|
|
|
|
|
2015-06-05 03:59:28 -04:00
|
|
|
for(var key in sets) {
|
|
|
|
if ( ! sets.hasOwnProperty(key) )
|
|
|
|
continue;
|
|
|
|
|
|
|
|
var set = sets[key];
|
|
|
|
gs.push(key);
|
|
|
|
f._load_set_json(key, undefined, set);
|
|
|
|
}
|
2016-10-07 18:11:05 -04:00
|
|
|
|
|
|
|
f._load_set_users(data.users);
|
|
|
|
|
2015-06-05 03:59:28 -04:00
|
|
|
}).fail(function(data) {
|
|
|
|
if ( data.status == 404 )
|
|
|
|
return typeof callback == "function" && callback(false);
|
|
|
|
|
|
|
|
tries = tries || 0;
|
|
|
|
tries++;
|
|
|
|
if ( tries < 50 )
|
|
|
|
return f.load_global_sets(callback, tries);
|
|
|
|
|
|
|
|
return typeof callback == "function" && callback(false);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-10-07 18:11:05 -04:00
|
|
|
FFZ.prototype._load_set_users = function(data) {
|
|
|
|
if ( data )
|
|
|
|
for(var set_id in data)
|
|
|
|
if ( data.hasOwnProperty(set_id) ) {
|
|
|
|
var emote_set = this.emote_sets[set_id],
|
|
|
|
users = data[set_id];
|
|
|
|
|
|
|
|
for(var i=0; i < users.length; i++) {
|
|
|
|
var user = users[i],
|
|
|
|
ud = this.users[user] = this.users[user] || {},
|
|
|
|
sets = ud.sets = ud.sets || [];
|
|
|
|
|
|
|
|
if ( sets.indexOf(set_id) === -1 )
|
|
|
|
sets.push(set_id);
|
|
|
|
}
|
|
|
|
|
|
|
|
this.log('Added "' + (emote_set ? emote_set.title : set_id) + '" emote set to ' + utils.number_commas(users.length) + ' users.');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-06-05 03:59:28 -04:00
|
|
|
FFZ.prototype.load_set = function(set_id, callback, tries) {
|
|
|
|
var f = this;
|
2015-12-12 13:28:35 -05:00
|
|
|
jQuery.getJSON(constants.API_SERVER + "v1/set/" + set_id)
|
2015-06-05 03:59:28 -04:00
|
|
|
.done(function(data) {
|
|
|
|
f._load_set_json(set_id, callback, data && data.set);
|
2016-10-07 18:11:05 -04:00
|
|
|
f._load_set_users(data.users);
|
2015-06-05 03:59:28 -04:00
|
|
|
|
|
|
|
}).fail(function(data) {
|
|
|
|
if ( data.status == 404 )
|
|
|
|
return typeof callback == "function" && callback(false);
|
|
|
|
|
|
|
|
tries = tries || 0;
|
|
|
|
tries++;
|
|
|
|
if ( tries < 10 )
|
|
|
|
return f.load_set(set_id, callback, tries);
|
|
|
|
|
|
|
|
return typeof callback == "function" && callback(false);
|
|
|
|
});
|
2015-01-20 01:53:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
FFZ.prototype.unload_set = function(set_id) {
|
|
|
|
var set = this.emote_sets[set_id];
|
|
|
|
if ( ! set )
|
|
|
|
return;
|
|
|
|
|
|
|
|
this.log("Unloading emoticons for set: " + set_id);
|
|
|
|
|
|
|
|
utils.update_css(this._emote_style, set_id, null);
|
|
|
|
delete this.emote_sets[set_id];
|
2015-10-24 22:44:00 -04:00
|
|
|
|
|
|
|
if ( set.hasOwnProperty('source_ext') ) {
|
|
|
|
var api = this._apis[set.source_ext];
|
|
|
|
if ( api && api.emote_sets && api.emote_sets[set_id] )
|
|
|
|
api.emote_sets[set_id] = undefined;
|
|
|
|
}
|
2016-03-26 16:09:36 -04:00
|
|
|
|
2016-07-13 02:31:26 -04:00
|
|
|
if ( this._inputv )
|
|
|
|
Ember.propertyDidChange(this._inputv, 'ffz_emoticons');
|
2015-01-20 01:53:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
FFZ.prototype._load_set_json = function(set_id, callback, data) {
|
2015-06-05 03:59:28 -04:00
|
|
|
if ( ! data )
|
|
|
|
return typeof callback == "function" && callback(false);
|
|
|
|
|
2015-07-04 17:06:36 -04:00
|
|
|
// Do we have existing users?
|
|
|
|
var users = this.emote_sets[set_id] && this.emote_sets[set_id].users || [];
|
|
|
|
|
2015-01-20 01:53:18 -05:00
|
|
|
// Store our set.
|
|
|
|
this.emote_sets[set_id] = data;
|
2015-07-04 17:06:36 -04:00
|
|
|
data.users = users;
|
2015-01-20 01:53:18 -05:00
|
|
|
data.count = 0;
|
|
|
|
|
2015-06-05 03:59:28 -04:00
|
|
|
|
2015-01-20 01:53:18 -05:00
|
|
|
// Iterate through all the emoticons, building CSS and regex objects as appropriate.
|
2015-06-05 03:59:28 -04:00
|
|
|
var output_css = "",
|
|
|
|
ems = data.emoticons;
|
2015-01-20 01:53:18 -05:00
|
|
|
|
2015-06-05 03:59:28 -04:00
|
|
|
data.emoticons = {};
|
|
|
|
|
|
|
|
for(var i=0; i < ems.length; i++) {
|
|
|
|
var emote = ems[i];
|
2015-01-20 01:53:18 -05:00
|
|
|
|
2015-10-24 22:44:00 -04:00
|
|
|
//emote.klass = "ffz-emote-" + emote.id;
|
2015-06-05 03:59:28 -04:00
|
|
|
emote.set_id = set_id;
|
|
|
|
|
|
|
|
emote.srcSet = emote.urls[1] + " 1x";
|
|
|
|
if ( emote.urls[2] )
|
|
|
|
emote.srcSet += ", " + emote.urls[2] + " 2x";
|
|
|
|
if ( emote.urls[4] )
|
|
|
|
emote.srcSet += ", " + emote.urls[4] + " 4x";
|
2015-01-20 01:53:18 -05:00
|
|
|
|
|
|
|
if ( emote.name[emote.name.length-1] === "!" )
|
2015-10-27 14:25:13 -04:00
|
|
|
emote.regex = new RegExp("(^|\\W|\\b)(" + utils.escape_regex(emote.name) + ")(?=\\W|$)", "g");
|
2015-01-20 01:53:18 -05:00
|
|
|
else
|
2015-10-27 14:25:13 -04:00
|
|
|
emote.regex = new RegExp("(^|\\W|\\b)(" + utils.escape_regex(emote.name) + ")\\b", "g");
|
2015-01-20 01:53:18 -05:00
|
|
|
|
2016-07-13 02:31:26 -04:00
|
|
|
emote.token = {
|
|
|
|
type: "emoticon",
|
|
|
|
srcSet: emote.srcSet,
|
|
|
|
imgSrc: emote.urls[1],
|
|
|
|
ffzEmote: emote.id,
|
|
|
|
ffzEmoteSet: set_id,
|
|
|
|
altText: emote.hidden ? '???' : emote.name
|
|
|
|
};
|
2016-03-23 19:28:22 -04:00
|
|
|
|
2015-01-20 01:53:18 -05:00
|
|
|
output_css += build_css(emote);
|
|
|
|
data.count++;
|
2015-06-05 03:59:28 -04:00
|
|
|
data.emoticons[emote.id] = emote;
|
2015-01-20 01:53:18 -05:00
|
|
|
}
|
|
|
|
|
2015-06-05 03:59:28 -04:00
|
|
|
utils.update_css(this._emote_style, set_id, output_css + (data.css || ""));
|
|
|
|
this.log("Updated emoticons for set #" + set_id + ": " + data.title, data);
|
|
|
|
|
|
|
|
if ( this._cindex )
|
|
|
|
this._cindex.ffzFixTitle();
|
|
|
|
|
2015-01-20 01:53:18 -05:00
|
|
|
this.update_ui_link();
|
|
|
|
|
2016-07-13 02:31:26 -04:00
|
|
|
if ( this._inputv )
|
|
|
|
Ember.propertyDidChange(this._inputv, 'ffz_emoticons');
|
2016-03-26 16:09:36 -04:00
|
|
|
|
2016-04-11 18:57:25 -04:00
|
|
|
this.rerender_feed_cards(set_id);
|
2016-03-31 19:47:17 -04:00
|
|
|
|
2015-01-20 01:53:18 -05:00
|
|
|
if ( callback )
|
|
|
|
callback(true, data);
|
2015-01-12 17:58:07 -05:00
|
|
|
}
|