mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-27 12:55:55 +00:00
4.76.5
* Fixed: Current Channel profile rules not working correctly in mod view. * Fixed: The viewer count being detected incorrectly for users in some locales. * Changed: Add settings search support for several settings, such as blockable chat callout types.
This commit is contained in:
parent
15c33281ad
commit
1169d8fe64
5 changed files with 17 additions and 10 deletions
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "frankerfacez",
|
||||
"author": "Dan Salvato LLC",
|
||||
"version": "4.76.4",
|
||||
"version": "4.76.5",
|
||||
"description": "FrankerFaceZ is a Twitch enhancement suite.",
|
||||
"private": true,
|
||||
"license": "Apache-2.0",
|
||||
|
|
|
@ -474,7 +474,9 @@ Twilight.ROUTES = {
|
|||
'command-center': '/:userName/commandcenter',
|
||||
'embed-chat': '/embed/:userName/chat',
|
||||
'mod-view': '/moderator/:userName',
|
||||
'mod-popout-chat': '/popout/moderator/:userName/chat'
|
||||
'mod-popout-chat': '/popout/moderator/:userName/chat',
|
||||
'drops-inventory': '/drops/inventory',
|
||||
'drops-campaigns': '/drops/campaigns'
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -524,7 +524,7 @@ export default class Channel extends Module {
|
|||
// is actually a static string.
|
||||
if ( typeof c === 'string' && /^[0-9,.]+$/.test(c) ) {
|
||||
try {
|
||||
const val = parseInt(c.replace(/,/, ''), 10);
|
||||
const val = parseInt(c.replace(/\.,/, ''), 10);
|
||||
if ( ! isNaN(val) && isFinite(val) && val > 0 )
|
||||
return val;
|
||||
} catch(err) { /* no-op */ }
|
||||
|
|
|
@ -397,6 +397,7 @@ export default class ChatHook extends Module {
|
|||
ui: {
|
||||
path: 'Chat > Filtering > Block >> Callout Types @{"description":"This filter allows you to remove callouts of specific types from Twitch chat. Callouts are special messages that can be pinned to the bottom of chat and often have associated actions, like claiming a drop or sharing your resubscription."}',
|
||||
component: 'blocked-types',
|
||||
getExtraTerms: () => Object.keys(this.callout_types).filter(key => ! UNBLOCKABLE_CALLOUTS.includes(key)),
|
||||
data: () => Object
|
||||
.keys(this.callout_types)
|
||||
.filter(key => ! UNBLOCKABLE_CALLOUTS.includes(key))
|
||||
|
@ -420,6 +421,7 @@ export default class ChatHook extends Module {
|
|||
ui: {
|
||||
path: 'Chat > Filtering > Block >> Message Types @{"description":"This filter allows you to remove all messages of a certain type from Twitch chat. It can be used to filter system messages, such as Hosts or Raids. Some types, such as moderation actions, cannot be blocked to prevent chat functionality from breaking."}',
|
||||
component: 'blocked-types',
|
||||
getExtraTerms: () => Object.keys(this.chat_types).filter(key => ! UNBLOCKABLE_TYPES.includes(key) && ! /^\d+$/.test(key)),
|
||||
data: () => Object
|
||||
.keys(this.chat_types)
|
||||
.filter(key => ! UNBLOCKABLE_TYPES.includes(key) && ! /^\d+$/.test(key))
|
||||
|
|
|
@ -104,20 +104,23 @@ export default class ModView extends Module {
|
|||
updateRoot(el) {
|
||||
const root = this.fine.getReactInstance(el);
|
||||
|
||||
let channel = null, node = root, j = 0, i;
|
||||
while(node != null && channel == null && j < 10) {
|
||||
let state = node.memoizedState;
|
||||
i = 0;
|
||||
let channel = null;
|
||||
let node = this.fine.searchNode(root, n => {
|
||||
let i = 0;
|
||||
let state = n.memoizedState;
|
||||
while(state != null && channel == null && i < 50) {
|
||||
channel = state?.memoizedState?.current?.result?.data?.user ??
|
||||
state?.memoizedState?.current?.previousData?.user;
|
||||
|
||||
if (!channel?.id || !channel?.login)
|
||||
channel = null;
|
||||
|
||||
state = state?.next;
|
||||
i++;
|
||||
}
|
||||
node = node?.child;
|
||||
j++;
|
||||
}
|
||||
if (channel)
|
||||
return true;
|
||||
});
|
||||
|
||||
if ( channel?.id ) {
|
||||
if ( this._cached_id != channel.id ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue