mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-27 21:05:53 +00:00
3.5.379. Fix chat breaking due to unloaded badge data. Fix host mode not starting correctly. Add name_key parameter to API constructor. Use name_key for badge classes rather than id to give badges added by the API stable, predictable classnames.
This commit is contained in:
parent
caa68c507c
commit
32f3e9b20b
8 changed files with 60 additions and 55 deletions
|
@ -1,3 +1,16 @@
|
|||
<div class="list-header">3.5.379 <time datetime="2016-11-23">(2016-11-23)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Changed: Minor refactor to bits rendering.</li>
|
||||
<li>API Changed: Badge classes now use <code>name_key</code> rather than <code>id</code> for badges added through the API to give them predictable classes.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.378 <time datetime="2016-11-23">(2016-11-23)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Fixed: Chat breaking when trying to access data for a badge that ended up not loading.</li>
|
||||
<li>Fixed: Host mode would no longer trigger with FFZ enabled due to the removal of an experiment flag.</li>
|
||||
<li>API Changed: Add <code>name_key</code> parameter to API constructor.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.377 <time datetime="2016-11-21">(2016-11-21)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Fixed: Group bits emoticons in chat based on their prefix rather than as one single lump.</li>
|
||||
|
@ -62,23 +75,5 @@
|
|||
<li>Changed: Use high-DPI images for FrankerFaceZ badges and Transparent (Colored) badges.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.367 <time datetime="2016-11-09">(2016-11-09)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Fixed: Bug showing button to dismiss a pinned cheer twice.</li>
|
||||
<li>Fixed: Bug where a pinned cheer would linger when switching to another room.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.366 <time datetime="2016-11-09">(2016-11-09)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Added: Option to hide Pinned Cheers.</li>
|
||||
<li>Added: Option to control expanded view for Pinned Cheers.</li>
|
||||
<li>Fixed: Make the moderation tools for Pinned Cheers work correctly.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.365 <time datetime="2016-11-09">(2016-11-09)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Fixed: Emergency fix to stop Pinned Cheers from breaking FFZ.</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,21 @@
|
|||
<div class="list-header">3.5.367 <time datetime="2016-11-09">(2016-11-09)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Fixed: Bug showing button to dismiss a pinned cheer twice.</li>
|
||||
<li>Fixed: Bug where a pinned cheer would linger when switching to another room.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.366 <time datetime="2016-11-09">(2016-11-09)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Added: Option to hide Pinned Cheers.</li>
|
||||
<li>Added: Option to control expanded view for Pinned Cheers.</li>
|
||||
<li>Fixed: Make the moderation tools for Pinned Cheers work correctly.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.365 <time datetime="2016-11-09">(2016-11-09)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Fixed: Emergency fix to stop Pinned Cheers from breaking FFZ.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.364 <time datetime="2016-11-08">(2016-11-08)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Fixed: Player size when Theater Mode is enabled and you enter fullscreen.</li>
|
||||
|
|
|
@ -496,7 +496,7 @@ FFZ.prototype.get_twitch_badges = function(badge_tag, room_id) {
|
|||
klass: (BADGE_KLASSES[badge] || badge) + (is_known ? '' : ' unknown-badge') + ' version-' + version,
|
||||
title: binfo && binfo.title || BADGE_NAMES[badge] || badge.capitalize(),
|
||||
click_url: binfo && binfo.click_action === 'visit_url' && binfo.click_url,
|
||||
no_invert: ! versions.allow_invert && NO_INVERT_BADGES.indexOf(badge) !== -1,
|
||||
no_invert: ! (versions && versions.allow_invert) && NO_INVERT_BADGES.indexOf(badge) !== -1,
|
||||
no_color: ! CSS_BADGES.hasOwnProperty(badge),
|
||||
invert_invert: versions.invert_invert || INVERT_INVERT_BADGES.indexOf(badge) !== -1,
|
||||
transparent: TRANSPARENT_BADGES.indexOf(badge) !== -1
|
||||
|
|
|
@ -92,9 +92,8 @@ FFZ.prototype.setup_bits = function() {
|
|||
|
||||
Service.reopen({
|
||||
ffz_get_tier: function(prefix, amount) {
|
||||
var config = this.get('config') || {},
|
||||
pre_config = config[prefix] || {},
|
||||
tiers = pre_config.tiers || [],
|
||||
var config = this._getConfigPrefix(prefix) || {},
|
||||
tiers = config.tiers || [],
|
||||
tier = null,
|
||||
index = null;
|
||||
|
||||
|
@ -148,21 +147,15 @@ FFZ.prototype.setup_bits = function() {
|
|||
var output = [],
|
||||
config = this.get('config') || {prefixes: []};
|
||||
|
||||
f.log("update_css start");
|
||||
|
||||
for(var i=0; i < config.prefixes.length; i++) {
|
||||
var prefix = config.prefixes[i],
|
||||
data = config[prefix],
|
||||
tiers = data && data.tiers;
|
||||
|
||||
f.log("prefix: " + prefix + " -- tiers: " + tiers.length, tiers);
|
||||
|
||||
for(var x=0; x < tiers.length; x++)
|
||||
output.push(this._ffz_tier_css(x, prefix, tiers[x]));
|
||||
}
|
||||
|
||||
f.log("update_css end", output.join(''));
|
||||
|
||||
utils.update_css(f._chat_style, 'bit-styles', output.join(''));
|
||||
|
||||
}.observes('config')
|
||||
|
|
|
@ -99,7 +99,7 @@ FFZ.prototype.setup_profile_following = function() {
|
|||
|
||||
|
||||
// Modify followed items.
|
||||
this.update_views('component:display-followed-item', this.modify_display_followed_item);
|
||||
//this.update_views('component:display-followed-item', this.modify_display_followed_item);
|
||||
this.update_views('component:twitch-profile-card', this.modify_twitch_profile_card);
|
||||
}
|
||||
|
||||
|
@ -180,7 +180,7 @@ FFZ.prototype.modify_twitch_profile_card = function(component) {
|
|||
}
|
||||
|
||||
|
||||
FFZ.prototype.modify_display_followed_item = function(component) {
|
||||
/*FFZ.prototype.modify_display_followed_item = function(component) {
|
||||
var f = this;
|
||||
utils.ember_reopen_view(component, {
|
||||
ffzParentModel: function() {
|
||||
|
@ -305,4 +305,4 @@ FFZ.prototype.modify_display_followed_item = function(component) {
|
|||
el.appendChild(actions);
|
||||
}
|
||||
});
|
||||
}
|
||||
}*/
|
|
@ -2107,21 +2107,16 @@ FFZ.prototype._modify_room = function(room) {
|
|||
delay = 3000 + Math.floor((percentile || 0) * Math.random());
|
||||
}
|
||||
|
||||
if ( this.get("experiments.shouldSeeRedesign") ) {
|
||||
var c = this.get("store").peekRecord("channel", channel.get("name"));
|
||||
if ( c ) {
|
||||
if ( target )
|
||||
this.pendingFetchHostModeTarget = Ember.run.debounce(this, "fetchHostModeTarget", {
|
||||
currentChannel: c,
|
||||
targetName: target
|
||||
}, delay);
|
||||
else
|
||||
c.set("hostModeTarget", null);
|
||||
}
|
||||
|
||||
} else channel.setHostMode({
|
||||
target: target, delay: delay
|
||||
});
|
||||
var c = this.get("store").peekRecord("channel", channel.get("name"));
|
||||
if ( c ) {
|
||||
if ( target )
|
||||
this.pendingFetchHostModeTarget = Ember.run.debounce(this, "fetchHostModeTarget", {
|
||||
currentChannel: c,
|
||||
targetName: target
|
||||
}, delay);
|
||||
else
|
||||
c.set("hostModeTarget", null);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -69,14 +69,18 @@ var API = FFZ.API = function(instance, name, icon, version, name_key) {
|
|||
this.name = name || ("Extension#" + this.id);
|
||||
this.name_key = name_key || this.name.replace(/[^A-Z0-9_\-]/g, '').toLowerCase();
|
||||
|
||||
// We can't start name key with a number.
|
||||
if ( /^[0-9]/.test(this.name_key) )
|
||||
this.name_key = '_' + this.name_key;
|
||||
|
||||
this.icon = icon || null;
|
||||
this.version = version || null;
|
||||
|
||||
this.ffz.log('Registered New Extension #' + this.id + ': ' + this.name);
|
||||
this.ffz.log('Registered New Extension #' + this.id + ' (' + this.name_key + '): ' + this.name);
|
||||
};
|
||||
|
||||
|
||||
FFZ.prototype.api = function(name, icon, version) {
|
||||
FFZ.prototype.api = function(name, icon, version, name_key) {
|
||||
// Load the known APIs list.
|
||||
if ( ! this._known_apis ) {
|
||||
this._known_apis = {};
|
||||
|
@ -88,17 +92,17 @@ FFZ.prototype.api = function(name, icon, version) {
|
|||
}
|
||||
}
|
||||
|
||||
return new API(this, name, icon, version);
|
||||
return new API(this, name, icon, version, name_key);
|
||||
}
|
||||
|
||||
|
||||
API.prototype.log = function(msg, data, to_json, log_json) {
|
||||
this.ffz.log('Ext "' + this.name + '": ' + msg, data, to_json, log_json);
|
||||
this.ffz.log('Ext #' + this.id + ' (' + this.name_key + '): ' + msg, data, to_json, log_json);
|
||||
}
|
||||
|
||||
|
||||
API.prototype.error = function(msg, error, to_json, log_json) {
|
||||
this.ffz.error('Ext "' + this.name + '": ' + msg, data, to_json, log_json);
|
||||
this.ffz.error('Ext #' + this.id + ' (' + this.name_key + '): ' + msg, data, to_json, log_json);
|
||||
}
|
||||
|
||||
|
||||
|
@ -431,7 +435,7 @@ API.prototype.unregister_room_set = function(room_id, set_id) {
|
|||
// -----------------------
|
||||
|
||||
API.prototype.add_badge = function(badge_id, badge) {
|
||||
var exact_id = this.id + '-' + badge_id,
|
||||
var exact_id = this.name_key + '-' + badge_id, // this.id + '-' + badge_id,
|
||||
|
||||
real_badge = _.extend({}, badge, {
|
||||
id: exact_id,
|
||||
|
@ -453,7 +457,7 @@ API.prototype.add_badge = function(badge_id, badge) {
|
|||
|
||||
|
||||
API.prototype.remove_badge = function(badge_id) {
|
||||
var exact_id = this.id + '-' + badge_id;
|
||||
var exact_id = this.name_key + '-' + badge_id;
|
||||
this.badges[badge_id] = undefined;
|
||||
|
||||
if ( this.ffz.badges )
|
||||
|
@ -475,7 +479,7 @@ API.prototype.user_add_badge = function(username, slot, badge_id) {
|
|||
badges = user.badges = user.badges || {},
|
||||
ffz_badges = ffz_user.badges = ffz_user.badges || {},
|
||||
|
||||
exact_id = this.id + '-' + badge_id,
|
||||
exact_id = this.name_key + '-' + badge_id,
|
||||
badge = {id: exact_id};
|
||||
|
||||
badges[slot] = ffz_badges[slot] = badge;
|
||||
|
|
|
@ -61,7 +61,7 @@ FFZ.channel_metadata = {};
|
|||
|
||||
// Version
|
||||
var VER = FFZ.version_info = {
|
||||
major: 3, minor: 5, revision: 377,
|
||||
major: 3, minor: 5, revision: 379,
|
||||
toString: function() {
|
||||
return [VER.major, VER.minor, VER.revision].join(".") + (VER.extra || "");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue