mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-17 18:26:57 +00:00
3.5.512. Fix blocked games in social bar. Dark CSS tweaks.
This commit is contained in:
parent
cd4de226e2
commit
055386767f
6 changed files with 69 additions and 15 deletions
|
@ -116,7 +116,16 @@ FFZ.settings_info.banned_games = {
|
|||
|
||||
on_update: function() {
|
||||
var banned = this.settings.banned_games,
|
||||
els = document.querySelectorAll('.ffz-directory-preview');
|
||||
els = document.querySelectorAll('.ffz-directory-preview'),
|
||||
SidebarThing = utils.ember_resolve('component:social-column/followed-channel'),
|
||||
views = utils.ember_views();
|
||||
|
||||
if ( SidebarThing )
|
||||
for(var key in views)
|
||||
if ( views[key] instanceof SidebarThing )
|
||||
try {
|
||||
views[key].ffzUpdateVisibility();
|
||||
} catch(err) { }
|
||||
|
||||
for(var i=0; i < els.length; i++) {
|
||||
var el = els[i],
|
||||
|
|
|
@ -379,12 +379,23 @@ FFZ._sc_followed_tooltip_id = 0;
|
|||
FFZ.prototype.modify_social_followed_channel = function(component) {
|
||||
var f = this;
|
||||
utils.ember_reopen_view(component, {
|
||||
ffzUpdateVisibility: function() {
|
||||
var el = this.get('element'),
|
||||
game = this.get('stream.game'),
|
||||
is_blocked = game ? f.settings.banned_games.indexOf(game.toLowerCase()) !== -1 : false;
|
||||
|
||||
el && el.classList.toggle('hidden', is_blocked);
|
||||
|
||||
}.observes('stream.game'),
|
||||
|
||||
ffz_init: function() {
|
||||
var t = this,
|
||||
el = this.get('element'),
|
||||
card = jQuery('.js-sc-card', el),
|
||||
data = card && card.data('tipsy');
|
||||
|
||||
this.ffzUpdateVisibility();
|
||||
|
||||
if ( ! data || ! data.options )
|
||||
return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue