1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-27 21:05:53 +00:00

3.5.477. Fix Channel Title on Top. Fix gray mode from the Twitch chat menu settings. Fix layout width calculations to be font-size aware. Fix Followed Since display on Following and Followers. Fix AutoMod. Fix settings on Chrome Canary. Darken associates' agreement. Closes #149. Closes #147. Closes #144.

This commit is contained in:
SirStendec 2017-04-28 16:59:49 -04:00
parent efaf46ee75
commit 557f56ee55
12 changed files with 120 additions and 58 deletions

View file

@ -1,3 +1,32 @@
<div class="list-header">3.5.477 <time datetime="2017-04-28">(2017-04-28)</time></div>
<ul class="chat-menu-content menu-side-padding">
<li>Fixed: Channel Title on Top setting breaking after Twitch removed specific selectors for that part of the page.</li>
<li>Fixed: Don't re-enable gray mode if a user has it specifically disabled and they enable dark mode via the Twitch chat settings menu.</li>
</ul>
<div class="list-header">3.5.476 <time datetime="2017-04-28">(2017-04-28)</time></div>
<ul class="chat-menu-content menu-side-padding">
<li>Fixed: Incorrect layout width calculations when the browser's default font size is not as expected.</li>
<li>Fixed: Styles weren't applying properly to the Followed Since display on users' following and followers pages.</li>
</ul>
<div class="list-header">3.5.475 <time datetime="2017-04-24">(2017-04-24)</time></div>
<ul class="chat-menu-content menu-side-padding">
<li>Fixed: AutoMod stopped working due to internal changes to the Twitch app.</li>
<li>Removed: Excessive debug logging for settings.</li>
</ul>
<div class="list-header">3.5.474 <time datetime="2017-04-23">(2017-04-23)</time></div>
<ul class="chat-menu-content menu-side-padding">
<li>Fixed: Stop using <code>localStorage.hasOwnProperty</code> due to a Chrome bug.</li>
</ul>
<div class="list-header">3.5.473 <time datetime="2017-04-23">(2017-04-23)</time></div>
<ul class="chat-menu-content menu-side-padding">
<li>Added: Excessive debug logging for a settings loading issue.</li>
<li>Fixed: Darken the Twitch Associate agreement.</li>
</ul>
<div class="list-header">3.5.472 <time datetime="2017-04-22">(2017-04-22)</time></div>
<ul class="chat-menu-content menu-side-padding">
<li>Added: Support for the new Verified badge.</li>
@ -43,28 +72,5 @@
<li>Fixed: Position of Channel Bar with Minimize Navigation, channel bar on top, and non-minimized channel bar. (Yes, debugging layout things is fun.)</li>
</ul>
<div class="list-header">3.5.466 <time datetime="2017-04-11">(2017-04-11)</time></div>
<ul class="chat-menu-content menu-side-padding">
<li>Fixed: Following Data feature not working for top navigation.</li>
<li>Fixed: Open Following to Channels not working for top navigation.</li>
</ul>
<div class="list-header">3.5.465 <time datetime="2017-04-11">(2017-04-11)</time></div>
<ul class="chat-menu-content menu-side-padding">
<li>Added: Option to change the color of Twitch's Top Navigation bar.</li>
<li>Fixed: Minimize Navigation not properly hiding the newly modified top navigation bar.</li>
<li>Fixed: Darken a few changes to Twitch's layout.</li>
</ul>
<div class="list-header">3.5.464 <time datetime="2017-04-10">(2017-04-10)</time></div>
<ul class="chat-menu-content menu-side-padding">
<li>Fixed: Bug with BetterTTV v7 and tab completion handling.</li>
</ul>
<div class="list-header">3.5.463 <time datetime="2017-04-10">(2017-04-10)</time></div>
<ul class="chat-menu-content menu-side-padding">
<li>Added: Improved compatibility with BetterTTV v7 (aka the beta)</li>
</ul>
<div class="list-header" id="ffz-old-news-button"><a href="#">View Older</a></div>
<div id="ffz-old-news"></div>

View file

@ -1183,6 +1183,21 @@ body.ffz-dark:not([data-page="teams#show"]),
color: rgb(222,222,222);
}
.ffz-dark .static-page h1 {
color: #fff !important;
-webkit-text-stroke: none !important;
}
.ffz-dark .static-page p.p2 {
color: #ccc;
-webkit-text-stroke: none;
}
.ffz-dark .static-page td,
.ffz-dark .static-page td {
border-color: #474747;
}
.ffz-dark .legal_page ol.legal li p {
color: #ccc;
}

View file

@ -1,3 +1,26 @@
<div class="list-header">3.5.466 <time datetime="2017-04-11">(2017-04-11)</time></div>
<ul class="chat-menu-content menu-side-padding">
<li>Fixed: Following Data feature not working for top navigation.</li>
<li>Fixed: Open Following to Channels not working for top navigation.</li>
</ul>
<div class="list-header">3.5.465 <time datetime="2017-04-11">(2017-04-11)</time></div>
<ul class="chat-menu-content menu-side-padding">
<li>Added: Option to change the color of Twitch's Top Navigation bar.</li>
<li>Fixed: Minimize Navigation not properly hiding the newly modified top navigation bar.</li>
<li>Fixed: Darken a few changes to Twitch's layout.</li>
</ul>
<div class="list-header">3.5.464 <time datetime="2017-04-10">(2017-04-10)</time></div>
<ul class="chat-menu-content menu-side-padding">
<li>Fixed: Bug with BetterTTV v7 and tab completion handling.</li>
</ul>
<div class="list-header">3.5.463 <time datetime="2017-04-10">(2017-04-10)</time></div>
<ul class="chat-menu-content menu-side-padding">
<li>Added: Improved compatibility with BetterTTV v7 (aka the beta)</li>
</ul>
<div class="list-header">3.5.462 <time datetime="2017-04-08">(2017-04-08)</time></div>
<ul class="chat-menu-content menu-side-padding">
<li>Fixed: Rendering of <code>system-msg</code> tags that contain template strings or other nonsense that Twitch, for some reason, isn't just putting in the message itself and is making the client reconstruct from tags.</li>

View file

@ -178,11 +178,16 @@ FFZ.prototype.setup_layout = function() {
}
var Layout = utils.ember_lookup('service:layout'),
LS = function(x) { return x },
f = this;
if ( ! Layout )
return this.log("Unable to locate the Ember service:layout");
try {
LS = window.require("web-client/utilities/layout-scaling").scalePixelValue;
} catch(err) { }
this.log("Hooking the Ember service:layout");
Layout.reopen({
@ -230,17 +235,17 @@ FFZ.prototype.setup_layout = function() {
}.property("ffzExtraHeight", "windowWidth", "rightColumnWidth", "fullSizePlayerDimensions", "windowHeight"),
contentWidth: function() {
var left_width = this.get('isSocialColumnEnabled') ? (
var left_width = this.get('isSocialColumnEnabled') ? LS(
f.settings.socialbar_hide ? 0 :
this.get('isSocialColumnCollapsed') ? 50 : 240
) : (
) : LS(
this.get('ffzMinimizeNavigation') ? 10 :
this.get('isLeftColumnClosed') ? 50 : 240
),
right_width = ! f.has_bttv && this.get('portraitMode') ? 0 : this.get("isRightColumnClosed") ? 0 : this.get("rightColumnWidth");
return this.get("windowWidth") - left_width - right_width - 60;
return this.get("windowWidth") - left_width - right_width - LS(60);
}.property("windowWidth", 'ffzMinimizeNavigation', "portraitMode", "isRightColumnClosed", "isLeftColumnClosed", "rightColumnWidth", "isSocialColumnCollapsed", "isSocialColumnEnabled"),

View file

@ -875,7 +875,7 @@ FFZ.prototype._modify_chat_line = function(component, is_vod) {
buildModIconsHTML: function() {
var user = this.get('msgObject.from'),
is_tb = this.get('msgObject.twitchBotRejected'),
is_tb = this.get('msgObject.autoModRejected'),
is_pinned_cheer = this.get('msgObject.is_pinned_cheer'),
room_id = this.get('msgObject.room'),
@ -1332,10 +1332,10 @@ FFZ.prototype._modify_chat_subline = function(component, is_whisper) {
);
else if ( cl.contains('tb-reject') )
this.actions.clickedTwitchBotResponse.call(this, this.get('msgObject.tags.id'), 'no');
this.actions.clickedAutoModResponse.call(this, this.get('msgObject.tags.id'), 'no');
else if ( cl.contains('tb-allow') )
this.actions.clickedTwitchBotResponse.call(this, this.get('msgObject.tags.id'), 'yes');
this.actions.clickedAutoModResponse.call(this, this.get('msgObject.tags.id'), 'yes');
else if ( ! from )
return;

View file

@ -99,12 +99,13 @@ FFZ.prototype.refresh_twitch_inventory = function() {
.done(function(data) {
o = Object.keys(data.emoticon_sets || {});
var ets = f._twitch_emote_to_set = f._twitch_emote_to_set || {};
for(var i=0; i < o.length; i++) {
var set_id = o[i],
emotes = data.emoticon_sets[set_id];
for(var j=0; j < emotes.length; j++)
f._twitch_emote_to_set[emotes[j].id] = set_id;
ets[emotes[j].id] = set_id;
}
f._twitch_inventory_sets = o;

View file

@ -85,9 +85,10 @@ FFZ.prototype.api = function(name, icon, version, name_key) {
// Load the known APIs list.
if ( ! this._known_apis ) {
this._known_apis = {};
if ( localStorage.hasOwnProperty('ffz_known_apis') )
var stored_val = localStorage.getItem("ffz_known_apis");
if ( stored_val !== null )
try {
this._known_apis = JSON.parse(localStorage.ffz_known_apis);
this._known_apis = JSON.parse(stored_val);
} catch(err) {
this.error("Error loading Known APIs", err);
}

View file

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

View file

@ -69,9 +69,6 @@ FFZ.prototype.load_settings = function() {
this.settings.get_twitch = this._setting_get_twitch.bind(this);
var found_settings = false;
for(var key in FFZ.settings_info) {
if ( ! FFZ.settings_info.hasOwnProperty(key) )
continue;
@ -79,8 +76,7 @@ FFZ.prototype.load_settings = function() {
var info = FFZ.settings_info[key],
ls_key = info && info.storage_key || make_ls(key);
found_settings = found_settings || localStorage.hasOwnProperty(key);
this._setting_load(key) || found_settings;
this._setting_load(key);
}
// Listen for Changes
@ -117,21 +113,22 @@ FFZ.prototype.reset_settings = function() {
FFZ.prototype._get_settings_object = function(skip_default) {
var data = {
version: 1,
script_version: FFZ.version_info + '',
aliases: this.aliases,
filters: this.filters,
settings: {}
};
version: 1,
script_version: FFZ.version_info + '',
aliases: this.aliases,
filters: this.filters,
settings: {}
};
for(var key in FFZ.settings_info) {
if ( ! FFZ.settings_info.hasOwnProperty(key) )
continue;
var info = FFZ.settings_info[key],
ls_key = info.storage_key || make_ls(key);
ls_key = info.storage_key || make_ls(key),
stored_val = localStorage.getItem(ls_key);
if ( localStorage.hasOwnProperty(ls_key) && (!skip_default || this.settings[key] !== info.value) )
if ( (stored_val !== null) && (!skip_default || this.settings[key] !== info.value) )
data.settings[key] = this.settings[key];
}
@ -215,9 +212,9 @@ FFZ.prototype._load_settings_file = function(data, hide_alert) {
// Do this in a timeout so that any styles have a moment to update.
if ( ! hide_alert )
setTimeout(function(){
alert('Successfully loaded ' + applied.length + ' settings and skipped ' + skipped.length + ' settings. Added ' + aliases + ' user nicknames.');
});
setTimeout(function(){
alert('Successfully loaded ' + applied.length + ' settings and skipped ' + skipped.length + ' settings. Added ' + aliases + ' user nicknames.');
});
return [applied.length, skipped.length, aliases];
}
@ -797,13 +794,13 @@ FFZ.prototype._setting_load = function(key, default_value) {
ls_key = info && info.storage_key || make_ls(key),
val = default_value || (info && info.hasOwnProperty("value") ? info.value : undefined);
if ( localStorage.hasOwnProperty(ls_key) ) {
var stored_val = localStorage.getItem(ls_key);
if ( stored_val !== null )
try {
val = JSON.parse(localStorage.getItem(ls_key));
val = JSON.parse(stored_val);
} catch(err) {
this.log('Error loading value for "' + key + '": ' + err);
this.log('Error parsing value for "' + key + '": ' + err);
}
}
if ( info && info.process_value )
val = info.process_value.call(this, val);
@ -860,9 +857,7 @@ FFZ.prototype._setting_del = function(key) {
ls_key = info.storage_key || make_ls(key),
val = undefined;
if ( localStorage.hasOwnProperty(ls_key) )
localStorage.removeItem(ls_key);
localStorage.removeItem(ls_key);
if ( info )
val = this.settings[key] = info.hasOwnProperty("value") ? info.value : undefined;

View file

@ -63,7 +63,7 @@ FFZ.settings_info.socket_server_pool = {
return val;
},
visible: function() { return (localStorage.hasOwnProperty('ffz_socket_server_pool') && this.settings.socket_server_pool !== 1) || this.settings.developer_mode || (Date.now() - parseInt(localStorage.ffzLastDevMode || "0")) < 604800000; },
visible: function() { return (localStorage.getItem('ffz_socket_server_pool') !== null && this.settings.socket_server_pool !== 1) || this.settings.developer_mode || (Date.now() - parseInt(localStorage.ffzLastDevMode || "0")) < 604800000; },
category: "Debugging",
name: "Socket Server Cluster",

View file

@ -83,7 +83,7 @@ FFZ.prototype.modify_chat_settings_menu = function(component) {
cb.addEventListener("change", function(e) {
f.settings.set("dark_twitch", this.checked);
if ( this.checked && ! localStorage.hasOwnProperty('ffz_setting_dark_no_blue') )
if ( this.checked && localStorage.getItem('ffz_setting_dark_no_blue') === null )
f.settings.set("dark_no_blue", true);
});

View file

@ -54,6 +54,7 @@ body:not(.ffz-theater-basic-stats) .player-controls-top,
.ffz-hide-prime .drawer .warp__list.js-offers,
.ffz-hide-prime-collapsed .drawer.closed .js-offers,
.ffz-hide-friends-collapsed .drawer.closed .friend-list,
.ffz-minimal-channel-title .cn-metabar > div:first-child:not(:hover) .js-card__info,
.ffz-minimal-channel-title .cn-metabar__title:not(:hover) .card__info,
.ffz-minimal-channel-bar .cn-bar-spacer,
.ffz-channel-bar-bottom .cn-bar-spacer,
@ -299,13 +300,21 @@ body.ffz-bttv-dark .ffz-ui-toggle.blue.live:hover svg.svg-emoticons path { fill:
/* Minimal Channel Title */
.ffz-minimal-channel-title .cn-metabar > div:first-child:hover,
.ffz-minimal-channel-title .cn-metabar__title:hover {
background-color: #fff;
padding: 1rem;
margin-left: -1rem;
}
.ffz-dark.ffz-minimal-channel-title .cn-metabar > div:first-child:hover,
.ffz-dark.ffz-minimal-channel-title .cn-metabar__title:hover { background-color: #101010 }
.ffz-minimal-channel-title .cn-metabar > div:first-child:not(:hover) h3 {
margin-bottom: 0 !important;
}
.ffz-minimal-channel-title .cn-metabar > div:first-child:not(:hover) .cn-metabar__boxart,
.ffz-minimal-channel-title .cn-metabar__title:not(:hover) .card__img--boxart {
height: 20px !important;
width: 14px !important;
@ -3085,6 +3094,7 @@ body:not(.ffz-top-conversations) .conversations-list-bottom-bar {
.user.item { position: relative; }
.profile-card .overlay_info.length,
.card__img .overlay_info.length,
.user.item .overlay_info.length {
position: absolute;
@ -3104,14 +3114,17 @@ body:not(.ffz-top-conversations) .conversations-list-bottom-bar {
opacity: 0.75;
}
.profile-card .overlay_info.length,
.card__img .overlay_info.length { right: 5px }
.profile-card .overlay_info.length svg,
.card__img .overlay_info.length svg,
.user.item .overlay_info.length svg {
float: left;
margin: 3px 5px 3px 0;
}
.profile-card .overlay_info.length svg path,
.card__img .overlay_info.length svg path,
.user.item .actions .follow svg path,
.user.item .overlay_info.length svg path { fill: #fff; }
@ -3172,6 +3185,7 @@ body:not(.ffz-top-conversations) .conversations-list-bottom-bar {
body:not(.ffz-tags-on-channel) .tw-title--tall { height: 60px }
/*body:not(.ffz-tags-on-channel) #broadcast-meta .ct-tags,*/
.cn-metabar > div:first-child .ct-tags,
.cn-metabar__title .ct-tags,
/*body:not(.ffz-creative-showcase) .ct-banner-handler .tower > div:last-child,*/
body:not(.ffz-creative-showcase) .ct-spotlight-container { display: none; }
@ -3686,6 +3700,7 @@ body.ffz-bttv #ffz-feed-tabs .tabs { margin-bottom: 0 }
.ffz-channel-title-top .ffz-channel.ffz-host { margin-top: -55px }
.ffz-minimal-channel-title.ffz-channel-title-top .ffz-channel.ffz-host { margin-top: -25px }
.ffz-channel-title-top .cn-metabar > div:first-child,
.ffz-channel-title-top .cn-metabar__title {
position: absolute;
top: 5px;
@ -3693,6 +3708,7 @@ body.ffz-bttv #ffz-feed-tabs .tabs { margin-bottom: 0 }
z-index: 3;
}
.ffz-channel-title-top:not(.ffz-channel-bar-bottom):not(.ffz-minimal-channel-bar) #channel.ffz-bar-fixed .cn-metabar > div:first-child,
.ffz-channel-title-top:not(.ffz-channel-bar-bottom):not(.ffz-minimal-channel-bar) #channel.ffz-bar-fixed .cn-metabar__title {
margin-top: 50px;
}