diff --git a/src/main.js b/src/main.js index d4b8f08a..0983342c 100644 --- a/src/main.js +++ b/src/main.js @@ -100,7 +100,7 @@ class FrankerFaceZ extends Module { FrankerFaceZ.Logger = Logger; const VER = FrankerFaceZ.version_info = { - major: 4, minor: 0, revision: 0, extra: '-rc8.3', + major: 4, minor: 0, revision: 0, extra: '-rc8.4', commit: __git_commit__, build: __webpack_hash__, toString: () => diff --git a/src/sites/twitch-twilight/modules/bits_button.js b/src/sites/twitch-twilight/modules/bits_button.js new file mode 100644 index 00000000..97726503 --- /dev/null +++ b/src/sites/twitch-twilight/modules/bits_button.js @@ -0,0 +1,42 @@ +'use strict'; + +// ============================================================================ +// Bits Button +// ============================================================================ + +import Module from 'utilities/module'; + + +export default class BitsButton extends Module { + constructor(...args) { + super(...args); + + this.should_enable = true; + + this.inject('settings'); + this.inject('site.fine'); + + this.BitsButton = this.fine.define( + 'bits-button', + n => n.renderButton && n.toggleShowTutorial + ); + } + + onEnable() { + this.settings.on(':changed:chat.bits.show', this.BitsButton.forceUpdate, this.BitsButton); + + this.BitsButton.ready(cls => { + const t = this, + old_render = cls.prototype.render; + + cls.prototype.render = function() { + if ( ! t.settings.get('chat.bits.show') ) + return null; + + return old_render.call(this); + } + + this.BitsButton.forceUpdate(); + }) + } +} \ No newline at end of file diff --git a/src/sites/twitch-twilight/styles/fixes.scss b/src/sites/twitch-twilight/styles/fixes.scss index 15157dc0..4a9c7ce5 100644 --- a/src/sites/twitch-twilight/styles/fixes.scss +++ b/src/sites/twitch-twilight/styles/fixes.scss @@ -1,4 +1,8 @@ .tw-theme--dark .live-channel-card__boxart { border-right: none; border-bottom: none; +} + +.top-nav__menu > div:empty { + display: none } \ No newline at end of file