1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-03 00:18:31 +00:00

3.5.514. Fix schedule parsing. Dark CSS tweak for chat replay.

This commit is contained in:
SirStendec 2017-09-01 16:13:02 -04:00
parent 50f597b769
commit 69d9823206
6 changed files with 26 additions and 7 deletions

View file

@ -1,3 +1,13 @@
<div class="list-header">3.5.514 <time datetime="2017-09-01">(2017-09-01)</time></div>
<ul class="chat-menu-content menu-side-padding">
<li>Fixed: Schedule parsing issue with null values.</li>
</ul>
<div class="list-header">3.5.513 <time datetime="2017-08-22">(2017-08-22)</time></div>
<ul class="chat-menu-content menu-side-padding">
<li>Fixed: Dark CSS tweak for Chat Replay.</li>
</ul>
<div class="list-header">3.5.512 <time datetime="2017-08-18">(2017-08-18)</time></div>
<ul class="chat-menu-content menu-side-padding">
<li>Fixed: Blocked Games feature not properly hiding channels from the social bar.</li>

View file

@ -1395,8 +1395,15 @@ body.ffz-dark:not([data-page="teams#show"]),
fill: #242424 !important;
}
.ffz-dark .app-main .chatReplay.dark,
.ffz-dark .app-main .chatReplay .noticeWrap,
.ffz-dark .app-main .chatReplay .notice-wrapper {
background-color: #19191f;
}
.ffz-dark.ffz-no-blue .app-main .chatReplay.dark,
.ffz-dark.ffz-no-blue .app-main .chatReplay .noticeWrap,
.ffz-dark.ffz-no-blue .app-main .chatReplay .notice-wrapper {
background-color: #191919;
}

View file

@ -63,12 +63,12 @@ FFZ.prototype.modify_vod_chat_display = function(component) {
f._vodc = this;
if ( f.settings.dark_twitch )
this.$().parents('.chat-container').addClass('dark');
this.$().parents('.chat-container').addClass('dark').addClass('theme--dark');
this.parentView.addObserver('layout.isTheatreMode', function() {
if ( f._vodc && f.settings.dark_twitch )
setTimeout(function(){
f._vodc.$().parents('.chat-container').addClass('dark');
f._vodc.$().parents('.chat-container').addClass('dark').addClass('theme--dark');
});
});

View file

@ -61,7 +61,7 @@ FFZ.channel_metadata = {};
// Version
var VER = FFZ.version_info = {
major: 3, minor: 5, revision: 512,
major: 3, minor: 5, revision: 514,
toString: function() {
return [VER.major, VER.minor, VER.revision].join(".") + (VER.extra || "");
}

View file

@ -111,7 +111,7 @@ FFZ.channel_metadata.schedule = {
if ( current )
out.push('Now: ' + format(current));
if ( next )
if ( next && next.starttime )
out.push(
utils.full_human_time((Date.now() - next.starttime) / 1000).capitalize() + ': ' +
format(next));
@ -174,7 +174,7 @@ FFZ.channel_metadata.schedule = {
now = Date.now(),
is_current = run.starttime <= now && run.endtime >= now,
is_old = run.starttime < now,
current_date = run.starttime.toLocaleDateString();
current_date = run.starttime && run.starttime.toLocaleDateString();
if ( current_date !== last_date )
container.appendChild(utils.createElement('div', 'ffz-schedule-row ffz-schedule-date', current_date));
@ -199,7 +199,7 @@ FFZ.channel_metadata.schedule = {
el.innerHTML = '<div class="heading">' +
'<h2>' + utils.sanitize(run.name) + ' <span>(' + utils.sanitize(run.category).replace(/ +/g, '&nbsp;') + ')</span></h2>' +
'</div>' +
'<time class="time-start html-tooltip" title="Start' + (is_old ? 'ed ' : 's ') + utils.quote_san(utils.full_human_time((now - run.starttime) / 1000)) + '." datetime="' + utils.quote_san(run.starttime) + '">' + utils.sanitize(TimeFormat.format(run.starttime)) + '</time>' +
(run.starttime ? '<time class="time-start html-tooltip" title="Start' + (is_old ? 'ed ' : 's ') + utils.quote_san(utils.full_human_time((now - run.starttime) / 1000)) + '." datetime="' + utils.quote_san(run.starttime) + '">' + utils.sanitize(TimeFormat.format(run.starttime)) + '</time>' : '') +
'<div class="meta">' + meta.join(' &mdash; ') + '</div>' +
'<div class="runners">Runner' + utils.pluralize(run.runners) + ': ' +
utils.human_join(_.map(run.runners, function(x) {

View file

@ -103,7 +103,9 @@ var createElement = function(tag, className, content) {
date_regex = /^(\d{4}|\+\d{6})(?:-?(\d{2})(?:-?(\d{2})(?:T(\d{2})(?::?(\d{2})(?::?(\d{2})(?:(?:\.|,)(\d{1,}))?)?)?(Z|([\-+])(\d{2})(?::?(\d{2}))?)?)?)?)?$/,
parse_date = function(str) {
if ( typeof str === "number" )
if ( str === null )
return null;
else if ( typeof str === "number" )
return new Date(str);
var parts = str.match(date_regex);