diff --git a/package.json b/package.json index 199c021f..3daaf7db 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "frankerfacez", "author": "Dan Salvato LLC", - "version": "4.20.46", + "version": "4.20.47", "description": "FrankerFaceZ is a Twitch enhancement suite.", "license": "Apache-2.0", "scripts": { diff --git a/src/sites/twitch-twilight/modules/css_tweaks/index.js b/src/sites/twitch-twilight/modules/css_tweaks/index.js index 37c8bf47..3634c63c 100644 --- a/src/sites/twitch-twilight/modules/css_tweaks/index.js +++ b/src/sites/twitch-twilight/modules/css_tweaks/index.js @@ -138,7 +138,10 @@ export default class CSSTweaks extends Module { ] }, - changed: val => this.toggle('hide-side-nav', !val) + changed: val => { + this.toggle('hide-side-nav', !val); + this.emit('site.layout:resize'); + } }); this.settings.add('layout.side-nav.show-avatars', { diff --git a/src/sites/twitch-twilight/modules/layout.js b/src/sites/twitch-twilight/modules/layout.js index 711facc8..26bb27c6 100644 --- a/src/sites/twitch-twilight/modules/layout.js +++ b/src/sites/twitch-twilight/modules/layout.js @@ -203,6 +203,13 @@ export default class Layout extends Module { this.updateCardClass(inst); }); + this.ResizeDetector.ready(() => { + if ( this._needs_resize ) { + this._needs_resize = false; + this.handleResize(); + } + }); + this.SideBarChannels.ready((cls, instances) => { for(const inst of instances) this.updateCardClass(inst); @@ -261,16 +268,19 @@ export default class Layout extends Module { if ( this._resize_timer ) return; - this._resize_timer = setTimeout(() => this._handleResize(), 50); + this._resize_timer = setTimeout(() => this._handleResize(), 100); } _handleResize() { - cancelAnimationFrame(this._resize_timer); + clearTimeout(this._resize_timer); this._resize_timer = null; - for(const inst of this.ResizeDetector.instances) { - inst?.props?.onResize?.(); - } + if ( ! this.ResizeDetector.instances.size ) + this._needs_resize = true; + else + for(const inst of this.ResizeDetector.instances) { + inst?.props?.onResize?.(); + } } get is_minimal() { diff --git a/src/sites/twitch-twilight/modules/player.jsx b/src/sites/twitch-twilight/modules/player.jsx index ee27cc52..1c625aa5 100644 --- a/src/sites/twitch-twilight/modules/player.jsx +++ b/src/sites/twitch-twilight/modules/player.jsx @@ -217,6 +217,9 @@ export default class Player extends Module { }); } + /* + // This is currently broken due to changes Twitch has made in the player + // backend. Removing it for now to avoid user confusion. this.settings.add('player.allow-catchup', { default: true, ui: { @@ -230,7 +233,7 @@ export default class Player extends Module { for(const inst of this.Player.instances) this.updateAutoPlaybackRate(inst, val); } - }); + });*/ this.settings.add('player.mute-click', { default: false, @@ -870,7 +873,7 @@ export default class Player extends Module { } - updateAutoPlaybackRate(inst, val) { + /*updateAutoPlaybackRate(inst, val) { const player = inst.props?.mediaPlayerInstance; if ( ! player ) return; @@ -880,7 +883,7 @@ export default class Player extends Module { if ( player.setLiveSpeedUpRate ) player.setLiveSpeedUpRate(val ? 1.05 : 1); - } + }*/ updateHideExtensions(val) { @@ -1012,9 +1015,9 @@ export default class Player extends Module { this.addResetButton(inst); this.addCompressorButton(inst, false); - const player = inst?.props?.mediaPlayerInstance; + /*const player = inst?.props?.mediaPlayerInstance; if ( player && ! this.settings.get('player.allow-catchup') && player.setLiveSpeedUpRate ) - player.setLiveSpeedUpRate(1); + player.setLiveSpeedUpRate(1);*/ if ( inst._ffzUpdateVolume ) inst._ffzUpdateVolume(); diff --git a/src/utilities/constants.js b/src/utilities/constants.js index ef2cf894..ff5f55a0 100644 --- a/src/utilities/constants.js +++ b/src/utilities/constants.js @@ -11,7 +11,8 @@ export const API_SERVER = '//api.frankerfacez.com'; export const NEW_API = '//api2.frankerfacez.com'; //export const SENTRY_ID = 'https://1c3b56f127254d3ba1bd1d6ad8805eee@sentry.io/1186960'; -export const SENTRY_ID = 'https://07ded545d3224ca59825daee02dc7745@catbag.frankerfacez.com:444/2'; +//export const SENTRY_ID = 'https://07ded545d3224ca59825daee02dc7745@catbag.frankerfacez.com:444/2'; +export const SENTRY_ID = 'https://74b46b3894114f399d51949c6d237489@sentry.frankerfacez.com/2'; export const LV_SERVER = 'https://cbenni.com/api';