mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-27 21:05:53 +00:00
3.5.433. Fix link info for clips. Add it for videos. Minor dark theme tweak.
This commit is contained in:
parent
df7f5d6ba0
commit
ac8250928c
6 changed files with 41 additions and 14 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
<div class="list-header">3.5.433 <time datetime="2017-03-01">(2017-03-01)</time></div>
|
||||||
|
<ul class="chat-menu-content menu-side-padding">
|
||||||
|
<li>Added: Link information for Twitch Videos.</li>
|
||||||
|
<li>Fixed: Link information not showing for Twitch Clips.</li>
|
||||||
|
<li>Fixed: Dark theme for Prime advertisement bars on the front page. (Sorry Daxter please don't hate me anymore.)</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<div class="list-header">3.5.432 <time datetime="2017-02-26">(2017-02-26)</time></div>
|
<div class="list-header">3.5.432 <time datetime="2017-02-26">(2017-02-26)</time></div>
|
||||||
<ul class="chat-menu-content menu-side-padding">
|
<ul class="chat-menu-content menu-side-padding">
|
||||||
<li>Added: The Stats tab of moderation cards now tells you a user's ID, if and when they followed a channel, and how many times they've been banned in the channel.</li>
|
<li>Added: The Stats tab of moderation cards now tells you a user's ID, if and when they followed a channel, and how many times they've been banned in the channel.</li>
|
||||||
|
@ -63,14 +70,5 @@
|
||||||
<li>Fixed: Do not hide AutoMod buttons when a message has been dealt with. Only make them inactive, potentially preventing mis-clicks. (Thanks, Seldszar!)</li>
|
<li>Fixed: Do not hide AutoMod buttons when a message has been dealt with. Only make them inactive, potentially preventing mis-clicks. (Thanks, Seldszar!)</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="list-header">3.5.422 <time datetime="2017-01-27">(2017-01-27)</time></div>
|
|
||||||
<ul class="chat-menu-content menu-side-padding">
|
|
||||||
<li>Fixed: Re-sub notifications appearing with a white background within dark chat.</li>
|
|
||||||
<li>Fixed: Channel emotes not appearing in Chat Replay.</li>
|
|
||||||
<li>Fixed: Channel badges not appearing correctly at times in Chat Replay.</li>
|
|
||||||
<li>Fixed: Chat Replay not always scrolling to the bottom as new messages arrive.</li>
|
|
||||||
<li>Fixed: Tooltips for links to Clips.</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<div class="list-header" id="ffz-old-news-button"><a href="#">View Older</a></div>
|
<div class="list-header" id="ffz-old-news-button"><a href="#">View Older</a></div>
|
||||||
<div id="ffz-old-news"></div>
|
<div id="ffz-old-news"></div>
|
7
dark.css
7
dark.css
|
@ -1072,6 +1072,13 @@ body.ffz-dark:not([data-page="teams#show"]),
|
||||||
|
|
||||||
/* /p/ Pages */
|
/* /p/ Pages */
|
||||||
|
|
||||||
|
.ffz-dark .header-announcement__link,
|
||||||
|
.ffz-dark .front-page-announcement__link { color: inherit }
|
||||||
|
|
||||||
|
.ffz-dark .header-announcement {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
.ffz-dark #mantle_skin .wrapper {
|
.ffz-dark #mantle_skin .wrapper {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,12 @@
|
||||||
|
<div class="list-header">3.5.422 <time datetime="2017-01-27">(2017-01-27)</time></div>
|
||||||
|
<ul class="chat-menu-content menu-side-padding">
|
||||||
|
<li>Fixed: Re-sub notifications appearing with a white background within dark chat.</li>
|
||||||
|
<li>Fixed: Channel emotes not appearing in Chat Replay.</li>
|
||||||
|
<li>Fixed: Channel badges not appearing correctly at times in Chat Replay.</li>
|
||||||
|
<li>Fixed: Chat Replay not always scrolling to the bottom as new messages arrive.</li>
|
||||||
|
<li>Fixed: Tooltips for links to Clips.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<div class="list-header">3.5.421 <time datetime="2017-01-24">(2017-01-24)</time></div>
|
<div class="list-header">3.5.421 <time datetime="2017-01-24">(2017-01-24)</time></div>
|
||||||
<ul class="chat-menu-content menu-side-padding">
|
<ul class="chat-menu-content menu-side-padding">
|
||||||
<li>Fixed: Error initializing bits rendering breaking other parts of the client.</li>
|
<li>Fixed: Error initializing bits rendering breaking other parts of the client.</li>
|
||||||
|
|
|
@ -61,7 +61,7 @@ FFZ.channel_metadata = {};
|
||||||
|
|
||||||
// Version
|
// Version
|
||||||
var VER = FFZ.version_info = {
|
var VER = FFZ.version_info = {
|
||||||
major: 3, minor: 5, revision: 432,
|
major: 3, minor: 5, revision: 433,
|
||||||
toString: function() {
|
toString: function() {
|
||||||
return [VER.major, VER.minor, VER.revision].join(".") + (VER.extra || "");
|
return [VER.major, VER.minor, VER.revision].join(".") + (VER.extra || "");
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,8 @@ var FFZ = window.FrankerFaceZ,
|
||||||
|
|
||||||
LINK = /(?:https?:\/\/)?(?:[-a-zA-Z0-9@:%_\+~#=]+\.)+[a-z]{2,6}\b(?:[-a-zA-Z0-9@:%_\+.~#?&\/\/=()]*)/g,
|
LINK = /(?:https?:\/\/)?(?:[-a-zA-Z0-9@:%_\+~#=]+\.)+[a-z]{2,6}\b(?:[-a-zA-Z0-9@:%_\+.~#?&\/\/=()]*)/g,
|
||||||
|
|
||||||
CLIP_URL = /(?:https?:\/\/)?clips\.twitch\.tv\/(\w+)\/(\w+)/,
|
CLIP_URL = /^(?:https?:\/\/)?clips\.twitch\.tv\/(\w+?\/?\w*?)(?:\/edit)?(?:[\?#]|$)/,
|
||||||
|
VIDEO_URL = /^(?:https?:\/\/)?(?:www\.)twitch\.tv\/(?:\w+\/v|videos)\/(\w+)$/,
|
||||||
|
|
||||||
LINK_SPLIT = /^(?:(https?):\/\/)?(?:(.*?)@)?([^\/:]+)(?::(\d+))?(.*?)(?:\?(.*?))?(?:\#(.*?))?$/,
|
LINK_SPLIT = /^(?:(https?):\/\/)?(?:(.*?)@)?([^\/:]+)(?::(\d+))?(.*?)(?:\?(.*?))?(?:\#(.*?))?$/,
|
||||||
YOUTUBE_CHECK = /^(?:https?:\/\/)?(?:m\.|www\.)?youtu(?:be\.com|\.be)\/(?:v\/|watch\/|.*?(?:embed|watch).*?v=)?([a-zA-Z0-9\-_]+)$/,
|
YOUTUBE_CHECK = /^(?:https?:\/\/)?(?:m\.|www\.)?youtu(?:be\.com|\.be)\/(?:v\/|watch\/|.*?(?:embed|watch).*?v=)?([a-zA-Z0-9\-_]+)$/,
|
||||||
|
@ -1032,11 +1033,12 @@ FFZ.prototype.render_token = function(render_links, warn_links, render_bits, tok
|
||||||
this._link_data[href] = true;
|
this._link_data[href] = true;
|
||||||
|
|
||||||
var success = load_link_data.bind(this, href),
|
var success = load_link_data.bind(this, href),
|
||||||
clip_info = CLIP_URL.exec(href);
|
clip_info = CLIP_URL.exec(href),
|
||||||
|
video_info = VIDEO_URL.exec(href);
|
||||||
|
|
||||||
if ( clip_info ) {
|
if ( clip_info ) {
|
||||||
var clips = utils.ember_lookup('service:clips');
|
var clips = utils.ember_lookup('service:clips');
|
||||||
clips && clips.getClipInfo(clip_info[1] + '/' + clip_info[2]).then(function(data) {
|
clips && clips.getClipInfo(clip_info[1]).then(function(data) {
|
||||||
success(true, {
|
success(true, {
|
||||||
image: data.previewImage,
|
image: data.previewImage,
|
||||||
image_iframe: false,
|
image_iframe: false,
|
||||||
|
@ -1046,6 +1048,17 @@ FFZ.prototype.render_token = function(render_links, warn_links, render_bits, tok
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
} else if ( video_info ) {
|
||||||
|
utils.api.get("videos/" + video_info[1], undefined, {version: 5})
|
||||||
|
.then(function(data) {
|
||||||
|
success(true, {
|
||||||
|
image: data.preview.large,
|
||||||
|
image_iframe: false,
|
||||||
|
html: '<span class="ffz-clip-title">' + utils.sanitize(data.title) + ' [' + utils.time_to_string(data.length) + ']</span>' +
|
||||||
|
'Channel: ' + utils.sanitize(data.channel.display_name) +
|
||||||
|
'<br>Game: ' + utils.sanitize(data.game)
|
||||||
|
})});
|
||||||
|
|
||||||
} else
|
} else
|
||||||
this.ws_send("get_link", href, success);
|
this.ws_send("get_link", href, success);
|
||||||
}
|
}
|
||||||
|
|
|
@ -860,7 +860,7 @@ FFZ.mod_card_pages.name_history = {
|
||||||
if ( success ) {
|
if ( success ) {
|
||||||
for(var i=0; i < data.length; i++) {
|
for(var i=0; i < data.length; i++) {
|
||||||
var changed_at = data[i][0],
|
var changed_at = data[i][0],
|
||||||
changed = changed_at ? utils.parse_date(changed_at).toLocaleString() : 'Unknown';
|
changed = changed_at ? utils.parse_date(changed_at).toLocaleString() : (i === 0 ? 'Initial' : 'Unknown');
|
||||||
|
|
||||||
history.appendChild(utils.createElement('li', 'chat-line message-line admin no-messages',
|
history.appendChild(utils.createElement('li', 'chat-line message-line admin no-messages',
|
||||||
'<span class="timestamp">' + utils.sanitize(changed) + ':</span>' +
|
'<span class="timestamp">' + utils.sanitize(changed) + ':</span>' +
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue