mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-25 03:58:30 +00:00
3.5.356. Option to disable friend watching notices. Fix event emotes getting removed incorrectly from default sets.
This commit is contained in:
parent
34eb700c14
commit
142da87383
6 changed files with 63 additions and 16 deletions
|
@ -1,3 +1,10 @@
|
|||
<div class="list-header">3.5.356 <time datetime="2016-10-27">(2016-10-27)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Added: Option to disable "Your friend is now watching" in chat.</li>
|
||||
<li>Changed: Disabling Friends entirely will also hide those messages.</li>
|
||||
<li>Fixed: Event emoticons not appearing for some users due to a race condition.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.355 <time datetime="2016-10-27">(2016-10-27)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Added: Auto-Pause Hosted Channels is back! The player doesn't break anymore if you try to pause it immediately.</li>
|
||||
|
|
|
@ -2,7 +2,7 @@ var FFZ = window.FrankerFaceZ,
|
|||
HOSTED_SUB = / subscribed to /,
|
||||
constants = require('../constants'),
|
||||
utils = require('../utils'),
|
||||
helpers,
|
||||
tmimotes,
|
||||
|
||||
NOTICE_MAPPING = {
|
||||
'slow': 'slow_on',
|
||||
|
@ -58,17 +58,15 @@ var FFZ = window.FrankerFaceZ,
|
|||
'-webkit-mask-image: url("' + room.moderator_badge + '"); }';
|
||||
};
|
||||
|
||||
|
||||
try {
|
||||
helpers = window.require && window.require("ember-twitch-chat/helpers/chat-line-helpers");
|
||||
} catch(err) { }
|
||||
|
||||
|
||||
// --------------------
|
||||
// Initialization
|
||||
// --------------------
|
||||
|
||||
FFZ.prototype.setup_room = function() {
|
||||
try {
|
||||
tmimotes = window.require && window.require("web-client/utilities/tmi-emotes").default;
|
||||
} catch(err) { }
|
||||
|
||||
this.log("Creating room style element.");
|
||||
var f = this,
|
||||
s = this._room_style = document.createElement("style");
|
||||
|
@ -1245,6 +1243,26 @@ FFZ.prototype._modify_room = function(room) {
|
|||
}
|
||||
},
|
||||
|
||||
friendsInSameRoom: function(source) {
|
||||
if ( f.settings.sidebar_disable_friends || f.settings.disable_friend_notices )
|
||||
return [];
|
||||
|
||||
var room_name = this.get('roomProperties.id');
|
||||
return _.filter(this._super(source), function(x) {
|
||||
return x && x['id'] !== room_name;
|
||||
});
|
||||
},
|
||||
|
||||
addFriendsWatchingMessage: function(msg) {
|
||||
this.addMessage({
|
||||
style: 'admin friend-watching',
|
||||
message: msg,
|
||||
tags: {
|
||||
emotes: tmimotes && tmimotes(this.get('userEmotes').tryParseEmotes(msg))
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
addChannelModerationMessage: function(event) {
|
||||
// Throw out messages that are for other rooms.
|
||||
var room_id = '.' + this.get("roomProperties._id");
|
||||
|
|
|
@ -131,6 +131,19 @@ FFZ.settings_info.sidebar_hide_more_at_twitch = {
|
|||
};
|
||||
|
||||
|
||||
FFZ.settings_info.disable_friend_notices = {
|
||||
type: 'boolean',
|
||||
value: false,
|
||||
|
||||
category: 'Chat Filtering',
|
||||
no_mobile: true,
|
||||
no_bttv: true,
|
||||
|
||||
name: 'Disable Watching Friends Notices',
|
||||
help: 'Do not display notices in chat when your friends are watching the same stream.'
|
||||
};
|
||||
|
||||
|
||||
FFZ.settings_info.sidebar_disable_friends = {
|
||||
type: "boolean",
|
||||
value: false,
|
||||
|
|
|
@ -281,7 +281,7 @@ FFZ.prototype.load_global_sets = function(callback, tries) {
|
|||
// Remove non-API sets from default and global sets.
|
||||
for(var i=ds.length; i--; ) {
|
||||
var set_id = ds[i];
|
||||
if ( data.default_sets.indexOf(set_id) === -1 && (! f.emote_sets[set_id] || ! f.emote_sets[set_id].source_ext) )
|
||||
if ( data.default_sets.indexOf(set_id) === -1 && (!f.feature_friday && f.feature_friday.set !== set_id) && (! f.emote_sets[set_id] || ! f.emote_sets[set_id].source_ext) )
|
||||
ds.splice(i, 1);
|
||||
}
|
||||
|
||||
|
@ -293,7 +293,7 @@ FFZ.prototype.load_global_sets = function(callback, tries) {
|
|||
|
||||
for(var i=gs.length; i--; ) {
|
||||
var set_id = gs[i];
|
||||
if ( ! sets[set_id] && (! f.emote_sets[set_id] || ! f.emote_sets[set_id].source_ext) )
|
||||
if ( ! sets[set_id] && (!f.feature_friday && f.feature_friday.set !== set_id) && (! f.emote_sets[set_id] || ! f.emote_sets[set_id].source_ext) )
|
||||
gs.splice(i, 1);
|
||||
}
|
||||
|
||||
|
|
|
@ -91,8 +91,13 @@ FFZ.prototype._load_ff = function(data) {
|
|||
// Check for previous Feature Friday data and remove it.
|
||||
if ( this.feature_friday ) {
|
||||
// Remove the global set, delete the data, and reset the UI link.
|
||||
this.global_sets.removeObject(this.feature_friday.set);
|
||||
this.default_sets.removeObject(this.feature_friday.set);
|
||||
var ind = this.global_sets.indexOf(this.feature_friday.set);
|
||||
if ( ind !== -1 )
|
||||
this.global_sets.splice(ind, 1);
|
||||
|
||||
ind = this.default_sets.indexOf(this.feature_friday.set);
|
||||
if ( ind !== -1 )
|
||||
this.default_sets.splice(ind, 1);
|
||||
|
||||
this.feature_friday = null;
|
||||
this.update_ui_link();
|
||||
|
@ -103,10 +108,14 @@ FFZ.prototype._load_ff = function(data) {
|
|||
return;
|
||||
|
||||
// We have our data! Set it up.
|
||||
this.feature_friday = {set: data.set, channel: data.channel, live: false,
|
||||
this.feature_friday = {
|
||||
set: data.set,
|
||||
channel: data.channel,
|
||||
live: false,
|
||||
title: data.title || "Feature Friday",
|
||||
icon: data.icon,
|
||||
display_name: data.channel ? FFZ.get_capitalization(data.channel, this._update_ff_name.bind(this)) : data.title || "Feature Friday"};
|
||||
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);
|
||||
|
|
|
@ -61,7 +61,7 @@ FFZ.channel_metadata = {};
|
|||
|
||||
// Version
|
||||
var VER = FFZ.version_info = {
|
||||
major: 3, minor: 5, revision: 355,
|
||||
major: 3, minor: 5, revision: 356,
|
||||
toString: function() {
|
||||
return [VER.major, VER.minor, VER.revision].join(".") + (VER.extra || "");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue