mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-29 22:18:31 +00:00
parent
a2c796f502
commit
5f0f6fec08
6 changed files with 68 additions and 36 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
<div class="list-header">3.5.306 <time datetime="2016-10-02">(2016-10-02)</time></div>
|
||||||
|
<ul class="chat-menu-content menu-side-padding">
|
||||||
|
<li>Fixed: FFZ was not connecting to the chat of hosted channels.</li>
|
||||||
|
<li>Fixed: Show channel metadata in theater mode when hovering over the player. (Still not working correctly in Portrait Mode.)</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<div class="list-header">3.5.305 <time datetime="2016-10-01T17:40">(2016-10-01)</time></div>
|
<div class="list-header">3.5.305 <time datetime="2016-10-01T17:40">(2016-10-01)</time></div>
|
||||||
<ul class="chat-menu-content menu-side-padding">
|
<ul class="chat-menu-content menu-side-padding">
|
||||||
<li>Added: Badge previews to the <code>Hidden Badges</code> setting to make it more obvious how to hide any given badge when the names don't quite lien up.</li>
|
<li>Added: Badge previews to the <code>Hidden Badges</code> setting to make it more obvious how to hide any given badge when the names don't quite lien up.</li>
|
||||||
|
|
|
@ -79,42 +79,42 @@ FFZ.prototype.setup_channel = function() {
|
||||||
if ( this._ffz_update_timer )
|
if ( this._ffz_update_timer )
|
||||||
clearTimeout(this._ffz_update_timer);
|
clearTimeout(this._ffz_update_timer);
|
||||||
|
|
||||||
if ( ! this.get('channel.id') )
|
if ( ! this.get('channelModel.id') )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._ffz_update_timer = setTimeout(this.ffzCheckUpdate.bind(this), 55000 + (Math.random() * 10000));
|
this._ffz_update_timer = setTimeout(this.ffzCheckUpdate.bind(this), 55000 + (Math.random() * 10000));
|
||||||
}.observes("channel.id"),
|
}.observes("channelModel"),
|
||||||
|
|
||||||
ffzCheckUpdate: function() {
|
ffzCheckUpdate: function() {
|
||||||
var t = this,
|
var t = this,
|
||||||
id = t.get('channel.id');
|
channel_id = t.get('channelModel.id');
|
||||||
|
|
||||||
id && utils.api.get("streams/" + id, {}, {version:3})
|
channel_id && utils.api.get("streams/" + channel_id, {}, {version:3})
|
||||||
.done(function(data) {
|
.done(function(data) {
|
||||||
if ( ! data || ! data.stream ) {
|
if ( ! data || ! data.stream ) {
|
||||||
// If the stream is offline, clear its created_at time and set it to zero viewers.
|
// If the stream is offline, clear its created_at time and set it to zero viewers.
|
||||||
t.set('channel.stream.createdAt', null);
|
t.set('channelModel.stream.createdAt', null);
|
||||||
t.set('channel.stream.viewers', 0);
|
t.set('channelModel.stream.viewers', 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
t.set('channel.stream.createdAt', utils.parse_date(data.stream.created_at) || null);
|
t.set('channelModel.stream.createdAt', utils.parse_date(data.stream.created_at) || null);
|
||||||
t.set('channel.stream.viewers', data.stream.viewers || 0);
|
t.set('channelModel.stream.viewers', data.stream.viewers || 0);
|
||||||
|
|
||||||
var game = data.stream.game || (data.stream.channel && data.stream.channel.game);
|
var game = data.stream.game || (data.stream.channel && data.stream.channel.game);
|
||||||
if ( game ) {
|
if ( game ) {
|
||||||
t.set('channel.game', game);
|
t.set('channelModel.game', game);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( data.stream.channel ) {
|
if ( data.stream.channel ) {
|
||||||
if ( data.stream.channel.status )
|
if ( data.stream.channel.status )
|
||||||
t.set('channel.status', data.stream.channel.status);
|
t.set('channelModel.status', data.stream.channel.status);
|
||||||
|
|
||||||
if ( data.stream.channel.views )
|
if ( data.stream.channel.views )
|
||||||
t.set('channel.views', data.stream.channel.views);
|
t.set('channelModel.views', data.stream.channel.views);
|
||||||
|
|
||||||
if ( data.stream.channel.followers && t.get('channel.followers.isLoaded') )
|
if ( data.stream.channel.followers && t.get('channelModel.followers.isFulfilled') )
|
||||||
t.set('channel.followers.total', data.stream.channel.followers);
|
t.set('channelModel.followers.content.meta.total', data.stream.channel.followers);
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
@ -124,12 +124,12 @@ FFZ.prototype.setup_channel = function() {
|
||||||
},
|
},
|
||||||
|
|
||||||
ffzHostTarget: function() {
|
ffzHostTarget: function() {
|
||||||
var target = this.get('channel.hostModeTarget'),
|
var target = this.get('channelModel.hostModeTarget'),
|
||||||
name = target && target.get('name'),
|
name = target && target.get('name'),
|
||||||
id = target && target.get('id'),
|
id = target && target.get('id'),
|
||||||
display_name = target && target.get('display_name');
|
display_name = target && target.get('display_name');
|
||||||
|
|
||||||
if ( id !== f.__old_host_target ) {
|
/*if ( id !== f.__old_host_target ) {
|
||||||
if ( f.__old_host_target )
|
if ( f.__old_host_target )
|
||||||
f.ws_send("unsub", "channel." + f.__old_host_target);
|
f.ws_send("unsub", "channel." + f.__old_host_target);
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ FFZ.prototype.setup_channel = function() {
|
||||||
f.__old_host_target = id;
|
f.__old_host_target = id;
|
||||||
} else
|
} else
|
||||||
delete f.__old_host_target;
|
delete f.__old_host_target;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
if ( display_name )
|
if ( display_name )
|
||||||
FFZ.capitalization[name] = [display_name, Date.now()];
|
FFZ.capitalization[name] = [display_name, Date.now()];
|
||||||
|
@ -152,7 +152,7 @@ FFZ.prototype.setup_channel = function() {
|
||||||
if ( f.settings.srl_races )
|
if ( f.settings.srl_races )
|
||||||
f.rebuild_race_ui();
|
f.rebuild_race_ui();
|
||||||
|
|
||||||
}.observes("channel.hostModeTarget")
|
}.observes("channelModel.hostModeTarget")
|
||||||
});
|
});
|
||||||
|
|
||||||
Channel.ffzUpdateInfo();
|
Channel.ffzUpdateInfo();
|
||||||
|
@ -1290,7 +1290,7 @@ FFZ.settings_info.channel_bar_bottom = {
|
||||||
|
|
||||||
var Layout = utils.ember_lookup('service:layout');
|
var Layout = utils.ember_lookup('service:layout');
|
||||||
if ( Layout )
|
if ( Layout )
|
||||||
Ember.propertyDidChange(Layout, 'windowHeight');
|
Ember.propertyDidChange(Layout, 'ffzExtraHeight');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1324,7 +1324,7 @@ FFZ.settings_info.hide_channel_banner = {
|
||||||
|
|
||||||
var Layout = utils.ember_lookup('service:layout');
|
var Layout = utils.ember_lookup('service:layout');
|
||||||
if ( Layout )
|
if ( Layout )
|
||||||
Ember.propertyDidChange(Layout, 'windowHeight');
|
Ember.propertyDidChange(Layout, 'ffzExtraHeight');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1348,7 +1348,7 @@ FFZ.settings_info.channel_bar_collapse = {
|
||||||
|
|
||||||
var Layout = utils.ember_lookup('service:layout');
|
var Layout = utils.ember_lookup('service:layout');
|
||||||
if ( Layout )
|
if ( Layout )
|
||||||
Ember.propertyDidChange(Layout, 'windowHeight');
|
Ember.propertyDidChange(Layout, 'ffzExtraHeight');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1380,7 +1380,7 @@ FFZ.settings_info.channel_title_top = {
|
||||||
|
|
||||||
var Layout = utils.ember_lookup('service:layout');
|
var Layout = utils.ember_lookup('service:layout');
|
||||||
if ( Layout )
|
if ( Layout )
|
||||||
Ember.propertyDidChange(Layout, 'windowHeight');
|
Ember.propertyDidChange(Layout, 'ffzExtraHeight');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -185,7 +185,7 @@ FFZ.settings_info.input_complete_without_prefix = {
|
||||||
|
|
||||||
FFZ.settings_info.input_emoji = {
|
FFZ.settings_info.input_emoji = {
|
||||||
type: "boolean",
|
type: "boolean",
|
||||||
value: false,
|
value: true,
|
||||||
|
|
||||||
category: "Chat Input",
|
category: "Chat Input",
|
||||||
//visible: false,
|
//visible: false,
|
||||||
|
|
|
@ -174,15 +174,16 @@ FFZ.prototype.setup_layout = function() {
|
||||||
isTooSmallForRightColumn: function() {
|
isTooSmallForRightColumn: function() {
|
||||||
if ( ! f.has_bttv && this.get('portraitMode') ) {
|
if ( ! f.has_bttv && this.get('portraitMode') ) {
|
||||||
var size = this.get('playerSize'),
|
var size = this.get('playerSize'),
|
||||||
height = size[1];
|
extra = this.get('ffzExtraHeight'),
|
||||||
|
height = size[1] + extra;
|
||||||
|
|
||||||
// Make sure we have at least a bit of room for the chat.
|
// Make sure we have at least a bit of room for the chat.
|
||||||
return this.get("windowHeight") < (height + 120 + 60 + 200);
|
return this.get("windowHeight") < height;
|
||||||
|
|
||||||
} else
|
} else
|
||||||
return this.get("windowWidth") < (1090 - this.get('rightColumnWidth'))
|
return this.get("windowWidth") < (1090 - this.get('rightColumnWidth'))
|
||||||
|
|
||||||
}.property("windowWidth", "rightColumnWidth", "playerSize", "windowHeight"),
|
}.property("ffzExtraHeight", "windowWidth", "rightColumnWidth", "playerSize", "windowHeight"),
|
||||||
|
|
||||||
contentWidth: function() {
|
contentWidth: function() {
|
||||||
var left_width = this.get("isLeftColumnClosed") ? 50 : 240,
|
var left_width = this.get("isLeftColumnClosed") ? 50 : 240,
|
||||||
|
@ -192,15 +193,17 @@ FFZ.prototype.setup_layout = function() {
|
||||||
|
|
||||||
}.property("windowWidth", "portraitMode", "isRightColumnClosed", "isLeftColumnClosed", "rightColumnWidth"),
|
}.property("windowWidth", "portraitMode", "isRightColumnClosed", "isLeftColumnClosed", "rightColumnWidth"),
|
||||||
|
|
||||||
|
ffzExtraHeight: function() {
|
||||||
|
return (f.settings.channel_bar_collapse ? 10 : 60) + 15 +
|
||||||
|
(f.settings.channel_title_top === 2 ? 20 : f.settings.channel_title_top > 0 ? 55 : 0) +
|
||||||
|
(f.settings.channel_title_top ? 70 : 80);
|
||||||
|
}.property(""),
|
||||||
|
|
||||||
playerSize: function() {
|
playerSize: function() {
|
||||||
var h = this.get('windowHeight'),
|
var h = this.get('windowHeight'),
|
||||||
c = this.get('PLAYER_CONTROLS_HEIGHT'),
|
c = this.get('PLAYER_CONTROLS_HEIGHT'),
|
||||||
r = this.get('contentWidth'),
|
r = this.get('contentWidth'),
|
||||||
|
extra_height = this.get('ffzExtraHeight'),
|
||||||
extra_height =
|
|
||||||
(f.settings.channel_bar_collapse ? 10 : 60) + 15 +
|
|
||||||
(f.settings.channel_title_top === 2 ? 20 : f.settings.channel_title_top > 0 ? 55 : 0) +
|
|
||||||
(f.settings.channel_title_top ? 70 : 80),
|
|
||||||
|
|
||||||
i = Math.round(9 * r / 16) + c,
|
i = Math.round(9 * r / 16) + c,
|
||||||
d = h - extra_height,
|
d = h - extra_height,
|
||||||
|
@ -211,7 +214,7 @@ FFZ.prototype.setup_layout = function() {
|
||||||
s = Math.floor(Math.min(i, c));
|
s = Math.floor(Math.min(i, c));
|
||||||
|
|
||||||
return [l, o, s];
|
return [l, o, s];
|
||||||
}.property("contentWidth", "windowHeight", "portraitMode", "PLAYER_CONTROLS_HEIGHT"),
|
}.property("ffzExtraHeight", "contentWidth", "windowHeight", "portraitMode", "PLAYER_CONTROLS_HEIGHT"),
|
||||||
|
|
||||||
playerStyle: function() {
|
playerStyle: function() {
|
||||||
var size = this.get('playerSize'),
|
var size = this.get('playerSize'),
|
||||||
|
@ -258,10 +261,11 @@ FFZ.prototype.setup_layout = function() {
|
||||||
var size = this.get('playerSize'),
|
var size = this.get('playerSize'),
|
||||||
video_below = this.get('portraitVideoBelow'),
|
video_below = this.get('portraitVideoBelow'),
|
||||||
|
|
||||||
video_height = size[1] + (f.settings.minimal_channel_title ? 75 : 120) + 60,
|
video_height = size[1] + this.get('ffzExtraHeight'),
|
||||||
chat_height = window_height - video_height,
|
chat_height = window_height - video_height,
|
||||||
|
|
||||||
video_top = video_below ? chat_height : 0,
|
video_top = video_below ? chat_height : 0,
|
||||||
|
video_bottom = window_height - (video_top + video_height),
|
||||||
chat_top = video_below ? 0 : video_height,
|
chat_top = video_below ? 0 : video_height,
|
||||||
|
|
||||||
theatre_video_height = Math.floor(Math.max(window_height * 0.1, Math.min(window_height - 300, 9 * window_width / 16))),
|
theatre_video_height = Math.floor(Math.max(window_height * 0.1, Math.min(window_height - 300, 9 * window_width / 16))),
|
||||||
|
@ -304,10 +308,10 @@ FFZ.prototype.setup_layout = function() {
|
||||||
'body:not(.ffz-channel-bar-bottom) .cn-bar-fixed {' +
|
'body:not(.ffz-channel-bar-bottom) .cn-bar-fixed {' +
|
||||||
'top: ' + video_top + 'px}' +
|
'top: ' + video_top + 'px}' +
|
||||||
'.ffz-minimal-channel-bar.ffz-channel-bar-bottom .cn-bar {' +
|
'.ffz-minimal-channel-bar.ffz-channel-bar-bottom .cn-bar {' +
|
||||||
'bottom: ' + (chat_top - 40) + 'px}' +
|
'bottom: ' + (video_bottom - 40) + 'px}' +
|
||||||
'.ffz-minimal-channel-bar.ffz-channel-bar-bottom .cn-bar:hover,' +
|
'.ffz-minimal-channel-bar.ffz-channel-bar-bottom .cn-bar:hover,' +
|
||||||
'.ffz-channel-bar-bottom .cn-bar {' +
|
'.ffz-channel-bar-bottom .cn-bar {' +
|
||||||
'bottom: ' + chat_top + 'px}' +
|
'bottom: ' + video_bottom + 'px}' +
|
||||||
'body:not(.ffz-sidebar-swap) .cn-bar-fixed { right: 0 !important }' +
|
'body:not(.ffz-sidebar-swap) .cn-bar-fixed { right: 0 !important }' +
|
||||||
'body.ffz-sidebar-swap .cn-bar-fixed { left: 0 !important }';
|
'body.ffz-sidebar-swap .cn-bar-fixed { left: 0 !important }';
|
||||||
|
|
||||||
|
@ -335,7 +339,7 @@ FFZ.prototype.setup_layout = function() {
|
||||||
f._layout_style.innerHTML = out;
|
f._layout_style.innerHTML = out;
|
||||||
}
|
}
|
||||||
|
|
||||||
}.observes("isRightColumnClosed", "playerSize", "rightColumnWidth", "portraitMode", "windowHeight", "windowWidth"),
|
}.observes("ffzExtraHeight", "isRightColumnClosed", "playerSize", "rightColumnWidth", "portraitMode", "windowHeight", "windowWidth"),
|
||||||
|
|
||||||
ffzUpdatePlayerStyle: function() {
|
ffzUpdatePlayerStyle: function() {
|
||||||
Ember.propertyDidChange(Layout, 'playerStyle');
|
Ember.propertyDidChange(Layout, 'playerStyle');
|
||||||
|
@ -365,5 +369,7 @@ FFZ.prototype.setup_layout = function() {
|
||||||
// Force re-calculation of everything.
|
// Force re-calculation of everything.
|
||||||
Ember.propertyDidChange(Layout, 'windowWidth');
|
Ember.propertyDidChange(Layout, 'windowWidth');
|
||||||
Ember.propertyDidChange(Layout, 'windowHeight');
|
Ember.propertyDidChange(Layout, 'windowHeight');
|
||||||
|
Ember.propertyDidChange(Layout, 'ffzExtraHeight');
|
||||||
|
Ember.propertyDidChange(Layout, 'isTooSmallForRightColumn');
|
||||||
Layout.ffzUpdatePortraitCSS();
|
Layout.ffzUpdatePortraitCSS();
|
||||||
}
|
}
|
|
@ -34,7 +34,7 @@ FFZ.msg_commands = {};
|
||||||
|
|
||||||
// Version
|
// Version
|
||||||
var VER = FFZ.version_info = {
|
var VER = FFZ.version_info = {
|
||||||
major: 3, minor: 5, revision: 305,
|
major: 3, minor: 5, revision: 306,
|
||||||
toString: function() {
|
toString: function() {
|
||||||
return [VER.major, VER.minor, VER.revision].join(".") + (VER.extra || "");
|
return [VER.major, VER.minor, VER.revision].join(".") + (VER.extra || "");
|
||||||
}
|
}
|
||||||
|
|
20
style.css
20
style.css
|
@ -289,6 +289,10 @@ body.ffz-bttv-dark .ffz-ui-toggle.blue.live:hover svg.svg-emoticons path { fill:
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ffz-theater-stats .app-main.theatre .player-column:hover + .metadata-box .cn-metabar__more,
|
||||||
|
.ffz-theater-stats .app-main.theatre .player-column:focus + .metadata-box .cn-metabar__more,
|
||||||
|
.ffz-theater-stats .app-main.theatre .cn-metabar__more:hover,
|
||||||
|
.ffz-theater-stats .app-main.theatre .cn-metabar__more:focus,
|
||||||
.ffz-theater-stats .app-main.theatre .player-column:focus #hostmode > div.clearfix,
|
.ffz-theater-stats .app-main.theatre .player-column:focus #hostmode > div.clearfix,
|
||||||
.ffz-theater-stats .app-main.theatre .player-column:hover #hostmode > div.clearfix,
|
.ffz-theater-stats .app-main.theatre .player-column:hover #hostmode > div.clearfix,
|
||||||
.ffz-theater-stats .app-main.theatre .player-column:focus .stats-and-actions,
|
.ffz-theater-stats .app-main.theatre .player-column:focus .stats-and-actions,
|
||||||
|
@ -306,11 +310,27 @@ body.ffz-bttv-dark .ffz-ui-toggle.blue.live:hover svg.svg-emoticons path { fill:
|
||||||
opacity: 0.95;
|
opacity: 0.95;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ffz-theater-stats .app-main.theatre .player-column:hover + .metadata-box .cn-metabar__more,
|
||||||
|
.ffz-theater-stats .app-main.theatre .player-column:focus + .metadata-box .cn-metabar__more,
|
||||||
|
.ffz-theater-stats .app-main.theatre .cn-metabar__more:hover,
|
||||||
|
.ffz-theater-stats .app-main.theatre .cn-metabar__more:focus {
|
||||||
|
width: calc(100% - 20px);
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
.ffz-theater-stats.ffz-theatre-conversations .app-main.theatre .player-column:focus #hostmode > div.clearfix,
|
.ffz-theater-stats.ffz-theatre-conversations .app-main.theatre .player-column:focus #hostmode > div.clearfix,
|
||||||
.ffz-theater-stats.ffz-theatre-conversations .app-main.theatre .player-column:hover #hostmode > div.clearfix,
|
.ffz-theater-stats.ffz-theatre-conversations .app-main.theatre .player-column:hover #hostmode > div.clearfix,
|
||||||
.ffz-theater-stats.ffz-theatre-conversations .app-main.theatre .player-column:focus .stats-and-actions,
|
.ffz-theater-stats.ffz-theatre-conversations .app-main.theatre .player-column:focus .stats-and-actions,
|
||||||
.ffz-theater-stats.ffz-theatre-conversations .app-main.theatre .player-column:hover .stats-and-actions,
|
.ffz-theater-stats.ffz-theatre-conversations .app-main.theatre .player-column:hover .stats-and-actions,
|
||||||
|
|
||||||
|
.ffz-theater-stats.ffz-theatre-conversations .app-main.theatre .player-column:hover + .metadata-box .cn-metabar__more,
|
||||||
|
.ffz-theater-stats.ffz-theatre-conversations .app-main.theatre .player-column:focus + .metadata-box .cn-metabar__more,
|
||||||
|
.ffz-theater-stats.ffz-theatre-conversations .app-main.theatre .cn-metabar__more:hover,
|
||||||
|
.ffz-theater-stats.ffz-theatre-conversations .app-main.theatre .cn-metabar__more:focus,
|
||||||
|
.ffz-theater-stats.ffz-top-conversations .app-main.theatre .player-column:hover + .metadata-box .cn-metabar__more,
|
||||||
|
.ffz-theater-stats.ffz-top-conversations .app-main.theatre .player-column:focus + .metadata-box .cn-metabar__more,
|
||||||
|
.ffz-theater-stats.ffz-top-conversations .app-main.theatre .cn-metabar__more:hover,
|
||||||
|
.ffz-theater-stats.ffz-top-conversations .app-main.theatre .cn-metabar__more:focus,
|
||||||
.ffz-theater-stats.ffz-top-conversations .app-main.theatre .player-column:focus #hostmode > div.clearfix,
|
.ffz-theater-stats.ffz-top-conversations .app-main.theatre .player-column:focus #hostmode > div.clearfix,
|
||||||
.ffz-theater-stats.ffz-top-conversations .app-main.theatre .player-column:hover #hostmode > div.clearfix,
|
.ffz-theater-stats.ffz-top-conversations .app-main.theatre .player-column:hover #hostmode > div.clearfix,
|
||||||
.ffz-theater-stats.ffz-top-conversations .app-main.theatre .player-column:focus .stats-and-actions,
|
.ffz-theater-stats.ffz-top-conversations .app-main.theatre .player-column:focus .stats-and-actions,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue