1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-26 04:28:31 +00:00

3.5.84 to 3.5.100. Most importantly, started using new Ember stuff. -view-registry instead of Ember.View.views, and such. Finally added UI for managing pinned channels. Use HTTPS for the API and socket servers. Don't immediately unload chat rooms. Smarter chat tab behavior. Added /card command for opening mod cards. Other stuff.

This commit is contained in:
SirStendec 2015-12-12 13:28:35 -05:00
parent c167a8b626
commit 800553c602
28 changed files with 1016 additions and 525 deletions

View file

@ -86,14 +86,14 @@ API.prototype.log = function(msg, data, to_json, log_json) {
API.prototype._load_set = function(real_id, set_id, data) {
if ( ! data )
return false;
return null;
// Check for an existing set to copy the users.
var users = [];
if ( this.emote_sets[real_id] && this.emote_sets[real_id].users )
users = this.emote_sets[real_id].users;
var set = {
var emote_set = {
source: this.name,
source_ext: this.id,
source_id: set_id,
@ -108,14 +108,14 @@ API.prototype._load_set = function(real_id, set_id, data) {
title: data.title || "Global Emoticons",
};
this.emote_sets[real_id] = set;
this.emote_sets[real_id] = emote_set;
if ( this.ffz.emote_sets )
this.ffz.emote_sets[real_id] = set;
this.ffz.emote_sets[real_id] = emote_set;
var output_css = "",
ems = data.emoticons,
emoticons = set.emoticons;
emoticons = emote_set.emoticons;
for(var i=0; i < ems.length; i++) {
var emote = ems[i],
@ -158,15 +158,17 @@ API.prototype._load_set = function(real_id, set_id, data) {
new_emote.regex = emote.regex;
else if ( typeof emote.name !== "string" )
new_emote.regex = emote.name;
else if ( emote_set.require_spaces || emote.require_spaces )
new_emote.regex = new RegExp("(^| )(" + utils.escape_regex(emote.name) + ")(?= |$)", "g");
else
new_emote.regex = new RegExp("(^|\\W|\\b)(" + utils.escape_regex(emote.name) + ")(?=\\W|$)", "g");
output_css += build_css(new_emote);
set.count++;
emote_set.count++;
emoticons[id] = new_emote;
}
utils.update_css(this.ffz._emote_style, real_id, output_css + (set.css || ""));
utils.update_css(this.ffz._emote_style, real_id, output_css + (emote_set.css || ""));
if ( this.ffz._cindex )
this.ffz._cindex.ffzFixTitle();
@ -175,7 +177,7 @@ API.prototype._load_set = function(real_id, set_id, data) {
this.ffz.update_ui_link();
} catch(err) { }
return set;
return emote_set;
}
@ -223,7 +225,7 @@ API.prototype.unload_set = function(id) {
if ( ! room )
continue;
ind = room.ext_sets.indexOf(exact_id);
var ind = room.ext_sets.indexOf(exact_id);
if ( ind !== -1 )
room.ext_sets.splice(ind,1);
}
@ -232,7 +234,7 @@ API.prototype.unload_set = function(id) {
}
return set;
return emote_set;
}