mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-16 10:06:54 +00:00
3.5.66 to 3.5.77. Fixed a performance issue with chat scrolling. Fixed CSS issues introduced in the refactor. Added ReChat support. Fixed all tooltip positioning. Fixed emote usage reporting. Fix support for conversations beta. Fix Do Not Show Again link on portrait mode warning. Fix following data not loading on non-ember pages. Added emoji rendering when BTTV is detected. Made standard chat settings menu scroll. Added support for multiple commands with one button to in-line moderation icons.
This commit is contained in:
parent
0cabebdf19
commit
a050063c81
31 changed files with 885 additions and 275 deletions
|
@ -25,8 +25,6 @@ FFZ.prototype.setup_bttv = function(delay) {
|
|||
this.log("BetterTTV was detected after " + delay + "ms. Hooking.");
|
||||
this.has_bttv = true;
|
||||
|
||||
// this.track('setCustomVariable', '3', 'BetterTTV', BetterTTV.info.versionString());
|
||||
|
||||
// Disable Dark if it's enabled.
|
||||
document.body.classList.remove("ffz-dark");
|
||||
if ( this._dark_style ) {
|
||||
|
@ -224,14 +222,14 @@ FFZ.prototype.setup_bttv = function(delay) {
|
|||
// Why is emote parsing so bad? ;_;
|
||||
_.each(emotes, function(emote) {
|
||||
var tooltip = f._emote_tooltip(emote),
|
||||
eo = ['<img class="emoticon" data-ffz-emote="' + emote.id + '" srcset="' + (emote.srcSet || "") + '" src="' + emote.urls[1] + '" data-regex="' + emote.name + '" title="' + tooltip + '" />'],
|
||||
eo = ['<img class="emoticon html-tooltip" data-ffz-emote="' + emote.id + '" srcset="' + utils.quote_attr(emote.srcSet || "") + '" src="' + utils.quote_attr(emote.urls[1]) + '" data-regex="' + utils.quote_attr(emote.name) + '" title="' + utils.quote_attr(tooltip) + '">'],
|
||||
old_tokens = tokens;
|
||||
|
||||
tokens = [];
|
||||
|
||||
for(var i=0; i < old_tokens.length; i++) {
|
||||
var token = old_tokens[i];
|
||||
if ( typeof token != "string" ) {
|
||||
if ( typeof token !== "string" ) {
|
||||
tokens.push(token);
|
||||
continue;
|
||||
}
|
||||
|
@ -248,7 +246,7 @@ FFZ.prototype.setup_bttv = function(delay) {
|
|||
tokens.push(eo);
|
||||
|
||||
if ( mine && l_room )
|
||||
f.add_usage(l_room, emote.id);
|
||||
f.add_usage(l_room, emote);
|
||||
|
||||
} else
|
||||
tokens.push(bit);
|
||||
|
@ -258,9 +256,10 @@ FFZ.prototype.setup_bttv = function(delay) {
|
|||
}
|
||||
|
||||
// Sneak in Emojicon Processing
|
||||
/*
|
||||
if ( f.settings.parse_emoji && f.emoji_data ) {
|
||||
var old_tokens = tokens;
|
||||
var old_tokens = tokens,
|
||||
setting = f.settings.parse_emoji;
|
||||
|
||||
tokens = [];
|
||||
|
||||
for(var i=0; i < old_tokens.length; i++) {
|
||||
|
@ -280,20 +279,25 @@ FFZ.prototype.setup_bttv = function(delay) {
|
|||
variant = tbits.shift();
|
||||
|
||||
if ( variant === '\uFE0E' )
|
||||
bits.push(match);
|
||||
tokens.push(match);
|
||||
else {
|
||||
var eid = utils.emoji_to_codepoint(match, variant),
|
||||
data = f.emoji_data[eid];
|
||||
data = f.emoji_data[eid],
|
||||
src = data && (setting === 2 ? data.noto_src : data.tw_src);
|
||||
|
||||
if ( data ) {
|
||||
tokens.push(['<img class="emoticon" height="18px" srcset="' + (data.srcSet || "") + '" src="' + data.src + '" alt="' + alt + '" title="Emoji: ' + data.raw + '\nName: :' + data.short_name + ':">']);
|
||||
if ( data && src ) {
|
||||
var image = src && f.settings.emote_image_hover ? '<img class="emoticon ffz-image-hover" src="' + src + '">' : '',
|
||||
tooltip = image + "Emoji: " + data.raw + "<br>Name: " + data.name + (data.short_name ? "<br>Short Name: :" + data.short_name + ":" : ""),
|
||||
code = utils.quote_attr(data.raw);
|
||||
|
||||
tokens.push(['<img class="emoticon emoji html-tooltip" height="18px" data-ffz-emoji="' + eid + '" src="' + utils.quote_attr(src) + '" data-regex="' + code + '" alt="' + code + '" title="' + utils.quote_attr(tooltip) + '">']);
|
||||
} else
|
||||
tokens.push(match + (variant || ""));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
return tokens;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue