Skip to content

Comments

Update: Trubbel’s Utilities 4.2.3#332

Merged
SirStendec merged 2 commits intoFrankerFaceZ:masterfrom
Trubbel:master
Nov 24, 2025
Merged

Update: Trubbel’s Utilities 4.2.3#332
SirStendec merged 2 commits intoFrankerFaceZ:masterfrom
Trubbel:master

Conversation

@Trubbel
Copy link
Contributor

@Trubbel Trubbel commented Oct 19, 2025

  • Added: Full-width in directory
  • Added: Highlight Messages on Hover

@NBruderman
Copy link

@SirStendec can you take a look?

Copy link
Collaborator

@SirStendec SirStendec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there, sorry I disappeared for a while. Life's been pretty busy and I just missed this existing.

}
});

this.observer.observe(document.body, {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't attach observers to document.body, especially on active pages like one with chat. If you absolutely need to get this element through raw HTML, you should use elemental which uses a pooled observer alongside shutting that observer down as soon as the necessary element is found.

But more accurately you probably want to use events on the site.chat.scroller ChatScroller fine wrapper? You might be fine just attaching your mouse event handlers to that or override addScrollListeners and removeScrollListeners to add your event(s) there. Twitch calls into that if something causes the HTML element to be recreated, so that should remove any need to hold an observer open.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, though I don't approve of it in general, I do appreciate you removing the observer when the user has the setting disabled.

@Trubbel Trubbel requested a review from SirStendec November 22, 2025 10:40
@SirStendec SirStendec merged commit 8afb76b into FrankerFaceZ:master Nov 24, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants