1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-25 03:58:30 +00:00

4.0.0-rc8.4

* Fixed: Hide the Get Bits button in the site header. This now requires JavaScript to do effectively as the test selector was specifically removed.
This commit is contained in:
SirStendec 2018-07-23 17:11:42 -04:00
parent 2508a6c025
commit 30519a7377
3 changed files with 47 additions and 1 deletions

View file

@ -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: () =>

View file

@ -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();
})
}
}

View file

@ -2,3 +2,7 @@
border-right: none;
border-bottom: none;
}
.top-nav__menu > div:empty {
display: none
}