1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-17 19:40:54 +00:00
* Added: The FFZ Subwoofer badge now displays a user's number of subscribed months in its tool-tip.
* Added: Setting to set the default sorting mode of the directory. (Have you tried the Deck add-on?)
* Fixed: The location of certain player action buttons was incorrect after Twitch made changes to the player.
* Changed: Badges added by add-on are now grouped by add-on in badge visibility settings. This allows users to disable all badges from a given add-on at once, and is just generally nicer to look at.
* API Added: `iterateMessages()` method on the `chat` module as an easy way to iterate over all live chat messages, in case existing messages need to be modified without the overhead of tokenization.
* API Added: Badges can now be stacked together for visibility purposes, similar to Twitch's native badge versions, by setting a `base_id` on each badge.
* API Added: Badges can now display dynamic data on their tool-tip by using a `tooltipExtra` method. This was used to display Subwoofer subscription lengths.
* API Added: New setting UI type `setting-text` that can be used to insert arbitrary markdown into settings pages.
* API Changed: The `ffz_user_class` special property on messages can be an array instead of a string.
* API Fixed: Add-on proxy modules are now correctly used for an add-on's sub-modules.
This commit is contained in:
SirStendec 2023-11-02 21:39:52 -04:00
parent 0eaf1a55be
commit 21ae0059a5
22 changed files with 499 additions and 688 deletions

View file

@ -20,6 +20,31 @@ export default class BaseSite extends Module {
// DOM Manipulation
// ========================================================================
getReact() {
if ( this._react )
return this._react;
let react;
try {
react = this.getCore?.()?.intl?.react;
} catch(err) { /* no-op */ }
if ( react?.Component && react.createElement )
return this._react = react;
react = this.resolve('web_munch')?.getModule?.('react');
if ( react?.Component && react.createElement )
return this._react = react;
}
findReact() {
const react = this.getReact();
if ( react )
return Promise.resolve(react);
return this.resolve('web_munch').findModule('react');
}
awaitElement(selector, parent, timeout = 60000) {
if ( ! parent )
parent = document.documentElement;