mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-27 21:05:53 +00:00
3.5.524. Add socket server status to the Debug menu. Update the emoji regex. Fix global emote tooltips.
This commit is contained in:
parent
d208fcb3b6
commit
35ce17e3ee
8 changed files with 87 additions and 24 deletions
|
@ -1,3 +1,19 @@
|
|||
<div class="list-header">3.5.524 <time datetime="2017-09-15">(2017-09-15)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Fixed: Tooltips for global emotes not saying where they're from.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.523 <time datetime="2017-09-15">(2017-09-15)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Added: Socket server status to the Debug menu.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.522 <time datetime="2017-09-15">(2017-09-15)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Fixed: Emote data should be loading properly now with the socket servers under control.</li>
|
||||
<li>Fixed: Update the emoji parsing regular expression.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.521 <time datetime="2017-09-15">(2017-09-15)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Changed: Hopefully a more resilient way of grabbing emote data.</li>
|
||||
|
@ -55,16 +71,5 @@
|
|||
<li>Fixed: Dark CSS tweaks for the dashboard.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.511 <time datetime="2017-08-12">(2017-08-12)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Fixed: Bits rendering after Twitch removed the Ember bits-tags service.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.510 <time datetime="2017-08-10">(2017-08-10)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Added: <code>Chat Appearance > Enable Custom Badge Images</code> setting that can be used to disable custom mod badges for channels.</li>
|
||||
<li>Fixed: Re-sub messages not showing in channels without custom sub badges and with <code>Chat Appearance > Old-Style Subscriber Notices</code> enabled.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header" id="ffz-old-news-button"><a href="#">View Older</a></div>
|
||||
<div id="ffz-old-news"></div>
|
|
@ -1,3 +1,14 @@
|
|||
<div class="list-header">3.5.511 <time datetime="2017-08-12">(2017-08-12)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Fixed: Bits rendering after Twitch removed the Ember bits-tags service.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.510 <time datetime="2017-08-10">(2017-08-10)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Added: <code>Chat Appearance > Enable Custom Badge Images</code> setting that can be used to disable custom mod badges for channels.</li>
|
||||
<li>Fixed: Re-sub messages not showing in channels without custom sub badges and with <code>Chat Appearance > Old-Style Subscriber Notices</code> enabled.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.509 <time datetime="2017-08-07">(2017-08-07)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>API Changed: Throw the <code>room-recent-highlights</code> event even if the Recent Highlights feature is disabled.</li>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -61,7 +61,7 @@ FFZ.channel_metadata = {};
|
|||
|
||||
// Version
|
||||
var VER = FFZ.version_info = {
|
||||
major: 3, minor: 5, revision: 521,
|
||||
major: 3, minor: 5, revision: 524,
|
||||
toString: function() {
|
||||
return [VER.major, VER.minor, VER.revision].join(".") + (VER.extra || "");
|
||||
}
|
||||
|
|
|
@ -165,6 +165,7 @@ FFZ.prototype.ws_create = function() {
|
|||
|
||||
ws.onopen = function(e) {
|
||||
f._ws_open = true;
|
||||
f._ws_authenticated = false;
|
||||
f._ws_delay = 0;
|
||||
f.log("Socket Connected.");
|
||||
|
||||
|
|
|
@ -399,8 +399,14 @@ FFZ.prototype.get_twitch_set_for = function(emote_id, callback) {
|
|||
|
||||
this._twitch_emote_to_set[emote_id] = null;
|
||||
var f = this,
|
||||
use_ss = this._ws_open && Math.random() > .5,
|
||||
use_ss = this._ws_open,
|
||||
timer = null,
|
||||
cb = function(success, data) {
|
||||
if ( timer ) {
|
||||
clearTimeout(timer);
|
||||
timer = null;
|
||||
}
|
||||
|
||||
if ( ! success ) {
|
||||
f._twitch_emote_to_set[emote_id] = UNSET;
|
||||
return;
|
||||
|
@ -417,9 +423,10 @@ FFZ.prototype.get_twitch_set_for = function(emote_id, callback) {
|
|||
callback(set_id);
|
||||
};
|
||||
|
||||
if ( use_ss )
|
||||
if ( use_ss ) {
|
||||
this.ws_send("get_emote", emote_id, cb);
|
||||
else
|
||||
timer = setTimeout(cb.bind(this, false, null), 1000);
|
||||
} else
|
||||
fetch(constants.API_SERVER = "ed/emote/" + emote_id)
|
||||
.then(function(resp) {
|
||||
if ( ! resp.ok )
|
||||
|
@ -428,6 +435,8 @@ FFZ.prototype.get_twitch_set_for = function(emote_id, callback) {
|
|||
cb(true, data);
|
||||
})
|
||||
});
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
@ -444,8 +453,14 @@ FFZ.prototype.get_twitch_set = function(set_id, callback) {
|
|||
this._twitch_set_to_channel[set_id] = null;
|
||||
|
||||
var f = this,
|
||||
use_ss = this._ws_open && Math.random() > .5,
|
||||
use_ss = this._ws_open,
|
||||
timer = null,
|
||||
cb = function(success, data) {
|
||||
if ( timer ) {
|
||||
clearTimeout(timer);
|
||||
timer = null;
|
||||
}
|
||||
|
||||
if ( ! success ) {
|
||||
f._twitch_set_to_channel[set_id] = UNSET;
|
||||
return;
|
||||
|
@ -456,9 +471,10 @@ FFZ.prototype.get_twitch_set = function(set_id, callback) {
|
|||
callback(data || null);
|
||||
};
|
||||
|
||||
if ( use_ss )
|
||||
if ( use_ss ) {
|
||||
this.ws_send("get_emote_set", set_id, cb);
|
||||
else
|
||||
timer = setTimeout(cb.bind(this, false, null), 1000);
|
||||
} else
|
||||
fetch(constants.API_SERVER + "ed/set/" + set_id)
|
||||
.then(function(resp) {
|
||||
if ( ! resp.ok )
|
||||
|
@ -467,6 +483,8 @@ FFZ.prototype.get_twitch_set = function(set_id, callback) {
|
|||
cb(true, data);
|
||||
})
|
||||
});
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
@ -568,8 +586,8 @@ FFZ.prototype.render_tooltip = function(el) {
|
|||
|
||||
emote_id = this.getAttribute('data-emote');
|
||||
if ( emote_id ) {
|
||||
set_id = f._twitch_emote_to_set[emote_id];
|
||||
var set_data = set_id && f.get_twitch_set(set_id);
|
||||
set_id = f.get_twitch_set_for(emote_id);
|
||||
var set_data = set_id !== null && f.get_twitch_set(set_id);
|
||||
emote_set = set_data && set_data.c_name;
|
||||
|
||||
var set_type = "Channel",
|
||||
|
|
|
@ -115,12 +115,38 @@ FFZ.debugging_blocks = {
|
|||
return [
|
||||
['Client ID', localStorage.ffzClientId || '<i>not set</i>'],
|
||||
['Socket Server', this._ws_sock && this._ws_sock.url || '<i>disconnected</i>'],
|
||||
['Authenticated', this._ws_open && this._ws_authenticated],
|
||||
['Server Ping', last_ping || '<i>unknown</i>'],
|
||||
['Time Offset', offset || '<i>unknown</i>']
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
socket_servers: {
|
||||
order: 3,
|
||||
title: 'WS Server Status',
|
||||
refresh: 5000,
|
||||
type: 'list',
|
||||
|
||||
render: function() {
|
||||
var f = this;
|
||||
return new Promise(function(succeed, fail) {
|
||||
f.ws_send("get_server_status", null, function(s,data) {
|
||||
if ( ! s )
|
||||
return fail();
|
||||
|
||||
f._ws_authenticated = data['authenticated'];
|
||||
var output = [];
|
||||
for(var key in data)
|
||||
if ( key !== 'authenticated' )
|
||||
output.push([key, data[key]]);
|
||||
|
||||
succeed(output);
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
logviewer: {
|
||||
order: 4,
|
||||
title: "Logviewer Status",
|
||||
|
|
|
@ -103,9 +103,11 @@ FFZ.prototype.modify_user_emotes = function(service) {
|
|||
for(var set_id in emotes) {
|
||||
f.get_twitch_set(set_id);
|
||||
var es = emotes[set_id] || [],
|
||||
esl = es.length;
|
||||
esl = es.length,
|
||||
sid = typeof set_id === "number" ? set_id : parseInt(set_id);
|
||||
|
||||
for(var i=0; i < esl; i++)
|
||||
f._twitch_emote_to_set[es[i].id] = set_id;
|
||||
f._twitch_emote_to_set[es[i].id] = sid;
|
||||
}
|
||||
|
||||
if ( f._inputv )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue