mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-27 21:05:53 +00:00
3.5.458. Add a disclaimer to the ITAD popup about the benefits of buying games on Twitch. Fix player volume shenanigans. Closes #126. Closes #125.
This commit is contained in:
parent
61ac0b97f6
commit
1099cc95c2
7 changed files with 77 additions and 42 deletions
|
@ -1,3 +1,10 @@
|
|||
<div class="list-header">3.5.458 <time datetime="2017-04-05">(2017-04-06)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Changed: Display a disclaimer on the ITAD popup that purchases made on other websites don't earn Twitch Crates and don't support streamers. Those are both cool things and should be supported.</li>
|
||||
<li>Fixed: Scrolling over the player could end up scrolling the page when the player is already above 90% volume or below 10% volume.</li>
|
||||
<li>Fixed: Volume slider not always visible when it should be.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.457 <time datetime="2017-04-05">(2017-04-05)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Fixed: Another minor number formatting issue.</li>
|
||||
|
@ -48,33 +55,5 @@
|
|||
<li>Fixed: Darken updated clips UI.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.448 <time datetime="2017-04-02">(2017-04-02)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Added: Setting to use the Bits Redesign images from April 1st, 2017.</li>
|
||||
<li>Changed: Simplify the string on the Favorites tab of the My Emotes menu when you have no favorites.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.447 <time datetime="2017-04-02">(2017-04-02)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Added: Favorite emotes directly in chat! You can also favorite room-specific emotes now too.</li>
|
||||
<li>Changed: Dark theme CSS tweaks for the player.</li>
|
||||
<li>Fixed: Extra padding at the bottom of chat with minimal chat input enabled.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.446 <time datetime="2017-04-02">(2017-04-02)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Added: Emoji Size setting for further customizing how emoji are displayed.</li>
|
||||
<li>Changed: Emoji now scale with font size by default.</li>
|
||||
<li>Changed: Allow a value of zero for Notification Timeout.</li>
|
||||
<li>Fixed: Emoji would appear too small with Emoticon Alignment set to Baseline.</li>
|
||||
<li>Fixed: Favorited global emoticons would not display in the Favorites tab of the My Emoticons menu with global emotes turned off.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.445 <time datetime="2017-03-31">(2017-03-31)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Changed: Red backgrounds for lines with highlighted words and alternating background colors can now be toggled separately.</li>
|
||||
<li>Fixed: Z ordering issue with scrolling pause indicator.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header" id="ffz-old-news-button"><a href="#">View Older</a></div>
|
||||
<div id="ffz-old-news"></div>
|
4
dark.css
4
dark.css
|
@ -651,10 +651,12 @@ body.ffz-dark:not([data-page="teams#show"]),
|
|||
|
||||
.ffz-dark .tw-tabs__item > a.active,
|
||||
.ffz-dark .tw-tabs__item > button.active {
|
||||
color: #aaa;
|
||||
color: #ccc;
|
||||
box-shadow: 0 -1px 0 #ccc inset;
|
||||
}
|
||||
|
||||
.ffz-dark .game-details__nav > li > a.active { color: #fff }
|
||||
|
||||
.ffz-dark .mininav li > a:hover,
|
||||
.ffz-dark ul.mininav li.active,
|
||||
.ffz-dark ul.tabs li.selected a,
|
||||
|
|
|
@ -1,3 +1,31 @@
|
|||
<div class="list-header">3.5.448 <time datetime="2017-04-02">(2017-04-02)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Added: Setting to use the Bits Redesign images from April 1st, 2017.</li>
|
||||
<li>Changed: Simplify the string on the Favorites tab of the My Emotes menu when you have no favorites.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.447 <time datetime="2017-04-02">(2017-04-02)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Added: Favorite emotes directly in chat! You can also favorite room-specific emotes now too.</li>
|
||||
<li>Changed: Dark theme CSS tweaks for the player.</li>
|
||||
<li>Fixed: Extra padding at the bottom of chat with minimal chat input enabled.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.446 <time datetime="2017-04-02">(2017-04-02)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Added: Emoji Size setting for further customizing how emoji are displayed.</li>
|
||||
<li>Changed: Emoji now scale with font size by default.</li>
|
||||
<li>Changed: Allow a value of zero for Notification Timeout.</li>
|
||||
<li>Fixed: Emoji would appear too small with Emoticon Alignment set to Baseline.</li>
|
||||
<li>Fixed: Favorited global emoticons would not display in the Favorites tab of the My Emoticons menu with global emotes turned off.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.445 <time datetime="2017-03-31">(2017-03-31)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>Changed: Red backgrounds for lines with highlighted words and alternating background colors can now be toggled separately.</li>
|
||||
<li>Fixed: Z ordering issue with scrolling pause indicator.</li>
|
||||
</ul>
|
||||
|
||||
<div class="list-header">3.5.444 <time datetime="2017-03-27">(2017-03-27)</time></div>
|
||||
<ul class="chat-menu-content menu-side-padding">
|
||||
<li>4</li>
|
||||
|
|
|
@ -113,7 +113,7 @@ FFZ.prototype.modify_buy_game_now = function(view) {
|
|||
utils.ember_reopen_view(view, {
|
||||
itad_plain: null,
|
||||
itad_price: null,
|
||||
twitch_geo: null,
|
||||
itad_country: null,
|
||||
|
||||
ffz_init: function() {
|
||||
//f.log("Buy-Game-New Component", this);
|
||||
|
@ -121,14 +121,14 @@ FFZ.prototype.modify_buy_game_now = function(view) {
|
|||
this.ffzUpdateITADPlain();
|
||||
|
||||
var t = this;
|
||||
Twitch.geo.then(function(data) {
|
||||
t.set('twitch_geo', data && data.geo);
|
||||
f.get_location().then(function(data) {
|
||||
t.set('itad_country', data && data.country);
|
||||
});
|
||||
},
|
||||
|
||||
ffzTitle: function() {
|
||||
// Do this because Twitch's ToS say you're not allowed to use data collected from
|
||||
// the API to show users commercial offers. This extracts the game title from the
|
||||
// the API to show users commercial offers. This scrapes the game title from the
|
||||
// page itself and not from any kind of JS API.
|
||||
|
||||
// Granted, they're probably more worried about automated chat spam and people
|
||||
|
@ -189,23 +189,23 @@ FFZ.prototype.modify_buy_game_now = function(view) {
|
|||
ffzUpdateITADPrice: function() {
|
||||
var t = this,
|
||||
old_price = this.get('itad_price'),
|
||||
geo = this.get('twitch_geo'),
|
||||
country = this.get('itad_country'),
|
||||
plain = this.get('itad_plain');
|
||||
|
||||
if ( old_price && old_price[0] === plain )
|
||||
return;
|
||||
|
||||
if ( ! plain || ! geo )
|
||||
if ( ! plain || ! country )
|
||||
return this.set('itad_price', null);
|
||||
|
||||
this.set('itad_price', [plain, null]);
|
||||
f.ws_send("get_itad_prices", [plain, geo], function(success, data) {
|
||||
f.ws_send("get_itad_prices", [plain, country], function(success, data) {
|
||||
if ( ! success ) return;
|
||||
|
||||
t.set('itad_price', [plain, data]);
|
||||
});
|
||||
|
||||
}.observes('itad_plain', 'twitch_geo'),
|
||||
}.observes('itad_plain', 'itad_country'),
|
||||
|
||||
|
||||
ffzRenderPricing: function() {
|
||||
|
@ -292,7 +292,9 @@ FFZ.prototype.modify_buy_game_now = function(view) {
|
|||
// Add a by-line for IsThereAnyDeal.
|
||||
|
||||
var url = data[1].urls && data[1].urls.game || "https://isthereanydeal.com",
|
||||
by_line = utils.createElement('span', 'ffz-attribution', 'Source: <a rel="noreferrer" target="_blank" href="' + utils.quote_san(url) + '">IsThereAnyDeal.com</a><br><br>Any affiliate links in the provided data are the responsibility of IsThereAnyDeal.');
|
||||
by_line = utils.createElement('span', 'ffz-attributiona',
|
||||
'<hr>Source: <a rel="noreferrer" target="_blank" href="' + utils.quote_san(url) + '">IsThereAnyDeal.com</a><br><br>Any affiliate links in the provided data are the responsibility of IsThereAnyDeal.' +
|
||||
'<hr>Reminder: Buying games on Twitch directly supports partnered streamers and you can earn <a target="_blank" href="https://blog.twitch.tv/twitch-crates-are-coming-soon-f50fa0cd4cdf">Twitch Crates</a> containing emotes and badges.');
|
||||
|
||||
balloon.appendChild(by_line);
|
||||
|
||||
|
|
|
@ -136,7 +136,7 @@ FFZ.prototype.modify_persistent_player = function(player) {
|
|||
player = t.childViews && t.childViews[0] && t.childViews[0].get('player');
|
||||
|
||||
if ( player )
|
||||
player.volume += delta > 0 ? .1 : -.1;
|
||||
player.volume = Math.max(0, Math.min(1, player.volume + (delta > 0 ? .1 : -.1)));
|
||||
|
||||
event.preventDefault();
|
||||
return false;
|
||||
|
|
25
src/main.js
25
src/main.js
|
@ -61,7 +61,7 @@ FFZ.channel_metadata = {};
|
|||
|
||||
// Version
|
||||
var VER = FFZ.version_info = {
|
||||
major: 3, minor: 5, revision: 457,
|
||||
major: 3, minor: 5, revision: 458,
|
||||
toString: function() {
|
||||
return [VER.major, VER.minor, VER.revision].join(".") + (VER.extra || "");
|
||||
}
|
||||
|
@ -167,6 +167,29 @@ FFZ.prototype._pastebin = function(data) {
|
|||
// User Data
|
||||
// -------------------
|
||||
|
||||
FFZ.prototype.get_location = function(force_reload) {
|
||||
var f = this;
|
||||
return new Promise(function(succeed, fail) {
|
||||
if ( ! force_reload && f.__location )
|
||||
succeed(f.__location);
|
||||
|
||||
if ( window.Twitch && Twitch.geo )
|
||||
Twitch.geo.then(function(data) {
|
||||
f.__location = {
|
||||
region: data.region,
|
||||
country: data.geo,
|
||||
lang: data.preferred_language
|
||||
};
|
||||
|
||||
succeed(f.__location);
|
||||
});
|
||||
else
|
||||
// TODO: Implement my own lookup.
|
||||
fail('no provider available');
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
FFZ.prototype.get_user = function(force_reload) {
|
||||
if ( ! force_reload && this.__user && this.__user.chat_oauth_token )
|
||||
return this.__user;
|
||||
|
|
|
@ -2821,6 +2821,7 @@ li[data-name="following"] a {
|
|||
.ffz-player-volume .player .player-volume__slider-container,
|
||||
.ffz-classic-player .player .player-volume__slider-container {
|
||||
width: auto;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -4075,9 +4076,9 @@ body.ffz-sidebar-swap .app-main.theatre #main_col:not(.expandRight) #player[data
|
|||
|
||||
.itad-balloon span {
|
||||
display: block;
|
||||
border-top: 1px solid rgba(0,0,0,0.2);
|
||||
/*border-top: 1px solid rgba(0,0,0,0.2);
|
||||
margin-top: 5px;
|
||||
padding-top: 5px;
|
||||
padding-top: 5px;*/
|
||||
}
|
||||
|
||||
.ffz-dark .itad-balloon th,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue