From 5ce9e49496d97333bfa1ac370d9768a27c1ac6ed Mon Sep 17 00:00:00 2001 From: SirStendec Date: Mon, 21 Jul 2025 13:19:55 -0400 Subject: [PATCH] 4.77.11 * Fixed: Scrolling issues after Twitch removed the simplebar library. (Fixes #1718) * Fixed: Chat action hotkeys not working correctly. --- package.json | 2 +- src/modules/chat/actions/actions.jsx | 8 +- src/sites/twitch-twilight/index.js | 10 +- .../modules/chat/emote_menu.jsx | 128 ++++++++---------- .../twitch-twilight/modules/chat/scroller.js | 12 +- src/sites/twitch-twilight/styles/chat.scss | 6 + src/std-components/simplebar.vue | 34 +---- styles/main.scss | 4 + 8 files changed, 90 insertions(+), 114 deletions(-) diff --git a/package.json b/package.json index 8654263c..5ea9067f 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "frankerfacez", "author": "Dan Salvato LLC", - "version": "4.77.10", + "version": "4.77.11", "description": "FrankerFaceZ is a Twitch enhancement suite.", "private": true, "license": "Apache-2.0", diff --git a/src/modules/chat/actions/actions.jsx b/src/modules/chat/actions/actions.jsx index 4e0012ee..af6ccaed 100644 --- a/src/modules/chat/actions/actions.jsx +++ b/src/modules/chat/actions/actions.jsx @@ -553,12 +553,8 @@ export default class Actions extends Module { {reason_text ?
{reason_text}
: null} -
-
-
-
    {reason_elements}
-
-
+
+
    {reason_elements}
); } diff --git a/src/sites/twitch-twilight/index.js b/src/sites/twitch-twilight/index.js index 9e78962f..d7327b6e 100644 --- a/src/sites/twitch-twilight/index.js +++ b/src/sites/twitch-twilight/index.js @@ -21,6 +21,8 @@ import {has} from 'utilities/object'; import MAIN_URL from 'site/styles/main.scss'; +//import SimpleBar from 'simplebar'; + // ============================================================================ // The Site @@ -67,10 +69,12 @@ export default class Twilight extends BaseSite { onEnable() { this.settings = this.resolve('settings'); - this.web_munch.findModule('simplebar').then(sb => { + //window.ffzSimplebar = window.ffzSimplebar || SimpleBar; + + /*this.web_munch.findModule('simplebar').then(sb => { if (! window.ffzSimplebar && sb ) window.ffzSimplebar = sb; - }).catch(() => {}); + }).catch(() => {});*/ const thing = this.fine.searchNode(null, n => n?.pendingProps?.store?.getState), store = this.store = thing?.pendingProps?.store; @@ -466,6 +470,8 @@ Twilight.ROUTES = { 'user-events': '/:userName/events', 'user-followers': '/:userName/followers', 'user-following': '/:userName/following', + 'user-schedule': '/:userName/schedule', + 'user-about': '/:userName/about', 'product': '/products/:productName', 'prime': '/prime', 'turbo': '/turbo', diff --git a/src/sites/twitch-twilight/modules/chat/emote_menu.jsx b/src/sites/twitch-twilight/modules/chat/emote_menu.jsx index 7952ab77..d854ec04 100644 --- a/src/sites/twitch-twilight/modules/chat/emote_menu.jsx +++ b/src/sites/twitch-twilight/modules/chat/emote_menu.jsx @@ -2749,83 +2749,73 @@ export default class EmoteMenu extends Module {
-
-
- {loading && this.renderLoading()} - {!loading && sets && sets.map((data,idx) => data && (! visibility || (! data.emoji && ! data.is_favorites)) && createElement( - data.emoji ? t.EmojiSection : t.MenuSection, - { - key: data.key, - idx, - data, - ffz_sub_data: this.state.ffz_sub_data, - emote_modifiers: this.state.emote_modifiers, - animated: this.state.animated, - combineTabs: this.state.combineTabs, - showHeading: this.state.showHeading, - filtered: this.state.filtered, - visibility_control: visibility, - onClickToken: this.props.onClickToken, - addSection: this.addSection, - removeSection: this.removeSection, - startObserving: this.startObserving, - stopObserving: this.stopObserving - } - ))} - {! loading && (! sets || ! sets.length) && this.renderEmpty()} -
-
+ {loading && this.renderLoading()} + {!loading && sets && sets.map((data,idx) => data && (! visibility || (! data.emoji && ! data.is_favorites)) && createElement( + data.emoji ? t.EmojiSection : t.MenuSection, + { + key: data.key, + idx, + data, + ffz_sub_data: this.state.ffz_sub_data, + emote_modifiers: this.state.emote_modifiers, + animated: this.state.animated, + combineTabs: this.state.combineTabs, + showHeading: this.state.showHeading, + filtered: this.state.filtered, + visibility_control: visibility, + onClickToken: this.props.onClickToken, + addSection: this.addSection, + removeSection: this.removeSection, + startObserving: this.startObserving, + stopObserving: this.stopObserving + } + ))} + {! loading && (! sets || ! sets.length) && this.renderEmpty()}
{(! loading && this.state.quickNav && ! is_favs) && (
-
-
- {!loading && sets && sets.map(data => { - if ( ! data || (visibility && (data.is_favorites || data.emoji)) ) - return null; + {!loading && sets && sets.map(data => { + if ( ! data || (visibility && (data.is_favorites || data.emoji)) ) + return null; - const active = this.state.active_nav === data.key; + const active = this.state.active_nav === data.key; - return (); - })} - {no_tabs &&
} - {no_tabs && ()} + return (); + })} + {no_tabs &&
} + {no_tabs && (
+ )}
)}
diff --git a/src/sites/twitch-twilight/modules/chat/scroller.js b/src/sites/twitch-twilight/modules/chat/scroller.js index 28baa649..9db144e3 100644 --- a/src/sites/twitch-twilight/modules/chat/scroller.js +++ b/src/sites/twitch-twilight/modules/chat/scroller.js @@ -562,10 +562,11 @@ export default class Scroller extends Module { cls.prototype.ffz_updateActing = function() { this._ffz_key_frame_acting = null; - if ( ! this.scrollRef?.root ) + const root = t.fine.getChildNode(this); + if ( ! root ) return; - this.scrollRef.root.dataset.acting = this.ffz_acting; + root.dataset.acting = this.ffz_acting; } cls.prototype.ffzUpdateKeyTags = function() { @@ -579,13 +580,14 @@ export default class Scroller extends Module { if ( ! t.use_keys && this.ffz_use_keys === t.use_keys ) return; - if ( ! this.scrollRef?.root ) + const root = t.fine.getChildNode(this); + if ( ! root ) return; this.ffz_use_keys = t.use_keys; - this.scrollRef.root.classList.toggle('ffz--keys', t.use_keys); + root.classList.toggle('ffz--keys', t.use_keys); - const ds = this.scrollRef.root.dataset; + const ds = root.dataset; if ( ! t.use_keys ) { delete ds.alt; diff --git a/src/sites/twitch-twilight/styles/chat.scss b/src/sites/twitch-twilight/styles/chat.scss index 22281c1a..d5da932f 100644 --- a/src/sites/twitch-twilight/styles/chat.scss +++ b/src/sites/twitch-twilight/styles/chat.scss @@ -538,3 +538,9 @@ } } } + +.ffz-emote-menu--scroll-area { + overflow-y: auto; + overflow-x: hidden; + scrollbar-width: thin;; +} diff --git a/src/std-components/simplebar.vue b/src/std-components/simplebar.vue index efe15e08..95ba4dae 100644 --- a/src/std-components/simplebar.vue +++ b/src/std-components/simplebar.vue @@ -2,17 +2,9 @@
-
-
- -
-
+
@@ -29,27 +21,7 @@ export default { type: Number, default: 10 } - }, - - mounted() { - const scroller = this.$refs.scroller; - if (!scroller || ! window.ffzSimplebar || scroller.SimpleBar) - return; - - new ffzSimplebar(scroller, ffzSimplebar.getElOptions(scroller)); - }, - - methods: { - onScroll() { - // We do this to avoid the scroll position getting screwed up on - // an element that should never scroll. Thanks, web browsers. - const scroller = this.$refs.scroller; - if ( ! scroller || scroller.scrollTop == 0 ) - return; - - scroller.scrollTop = 0; - } } } - \ No newline at end of file + diff --git a/styles/main.scss b/styles/main.scss index 8ce452a5..c81b16d5 100644 --- a/styles/main.scss +++ b/styles/main.scss @@ -180,3 +180,7 @@ .ffz-aspect--align-bottom > :not(.ffz-aspect__spacer) { bottom: 0; } + +.ffz-scrollable { + scrollbar-width: thin; +}