mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-30 06:28:31 +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:
parent
2508a6c025
commit
30519a7377
3 changed files with 47 additions and 1 deletions
|
@ -100,7 +100,7 @@ class FrankerFaceZ extends Module {
|
||||||
FrankerFaceZ.Logger = Logger;
|
FrankerFaceZ.Logger = Logger;
|
||||||
|
|
||||||
const VER = FrankerFaceZ.version_info = {
|
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__,
|
commit: __git_commit__,
|
||||||
build: __webpack_hash__,
|
build: __webpack_hash__,
|
||||||
toString: () =>
|
toString: () =>
|
||||||
|
|
42
src/sites/twitch-twilight/modules/bits_button.js
Normal file
42
src/sites/twitch-twilight/modules/bits_button.js
Normal 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();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,3 +2,7 @@
|
||||||
border-right: none;
|
border-right: none;
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.top-nav__menu > div:empty {
|
||||||
|
display: none
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue