mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-12 17:10:54 +00:00
3.5.31 to 3.5.36. Added Portrait Mode. Fixed missing Op button on mod cards. Changed Feature Friday code to facilitate events without an associated channel, like Halloween. Fixed Stream Latency breaking on a broken player function. Added a simple JS API to let other extensions add emoticons to FFZ.
This commit is contained in:
parent
f62132cc7e
commit
d934508b04
21 changed files with 616 additions and 96 deletions
|
@ -17,7 +17,7 @@ FFZ.prototype.check_ff = function(tries) {
|
|||
if ( ! tries )
|
||||
this.log("Checking for Feature Friday data...");
|
||||
|
||||
jQuery.ajax(constants.SERVER + "script/event.json", {dataType: "json", context: this})
|
||||
jQuery.ajax(constants.SERVER + "script/event.json?_=" + (constants.DEBUG ? Date.now() : FFZ.version_info), {dataType: "json", context: this})
|
||||
.done(function(data) {
|
||||
return this._load_ff(data);
|
||||
}).fail(function(data) {
|
||||
|
@ -44,7 +44,7 @@ FFZ.ws_commands.reload_ff = function() {
|
|||
// --------------------
|
||||
|
||||
FFZ.prototype._feature_friday_ui = function(room_id, parent, view) {
|
||||
if ( ! this.feature_friday || this.feature_friday.channel == room_id )
|
||||
if ( ! this.feature_friday || this.feature_friday.channel === room_id )
|
||||
return;
|
||||
|
||||
this._emotes_for_sets(parent, view, [this.feature_friday.set], this.feature_friday.title, this.feature_friday.icon, "FrankerFaceZ");
|
||||
|
@ -52,7 +52,7 @@ FFZ.prototype._feature_friday_ui = function(room_id, parent, view) {
|
|||
// Before we add the button, make sure the channel isn't the
|
||||
// current channel.
|
||||
var Channel = App.__container__.lookup('controller:channel');
|
||||
if ( Channel && Channel.get('id') == this.feature_friday.channel )
|
||||
if ( ! this.feature_friday.channel || (Channel && Channel.get('id') === this.feature_friday.channel) )
|
||||
return;
|
||||
|
||||
|
||||
|
@ -98,13 +98,14 @@ FFZ.prototype._load_ff = function(data) {
|
|||
}
|
||||
|
||||
// If there's no data, just leave.
|
||||
if ( ! data || ! data.set || ! data.channel )
|
||||
if ( ! data || ! data.set )
|
||||
return;
|
||||
|
||||
// We have our data! Set it up.
|
||||
this.feature_friday = {set: data.set, channel: data.channel, live: false,
|
||||
title: data.title || "Feature Friday",
|
||||
display_name: FFZ.get_capitalization(data.channel, this._update_ff_name.bind(this))};
|
||||
icon: data.icon,
|
||||
display_name: data.channel ? FFZ.get_capitalization(data.channel, this._update_ff_name.bind(this)) : data.title || "Feature Friday"};
|
||||
|
||||
// Add the set.
|
||||
this.global_sets.push(data.set);
|
||||
|
@ -117,7 +118,7 @@ FFZ.prototype._load_ff = function(data) {
|
|||
|
||||
|
||||
FFZ.prototype._update_ff_live = function() {
|
||||
if ( ! this.feature_friday )
|
||||
if ( ! this.feature_friday || ! this.feature_friday.channel )
|
||||
return;
|
||||
|
||||
var f = this;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue