1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-28 15:27:43 +00:00
* Added: Better options for highlight / block terms, letting you make rules case sensitive, match whole words, and highlight in chat or not.
* Added: Documentation of glob syntax.
* Changed: Split `Chat > Filtering` into several sub-categories to make it easier to find specific options.
* Changed: Display seconds with the up-time metadata by default, matching Twitch.
* Fixed: The Unfollow button not hiding on the standalone player.
* Fixed: Loading issue for graphs on the dashboard.
* API Added: Allow add-ons to target the `player` flavor.
This commit is contained in:
SirStendec 2021-03-03 17:10:14 -05:00
parent 715a92e298
commit 16ab515b4b
26 changed files with 523 additions and 220 deletions

View file

@ -500,10 +500,28 @@ export function glob_to_regex(input) {
if ( CONTROL_CHARS.includes(char) )
output += `\\${char}`;
else if ( char === '?' )
else if ( char === '\\' ) {
i++;
const next = input[i];
if ( next ) {
if ( CONTROL_CHARS.includes(next) )
output += `\\${next}`;
else
output += next;
}
} else if ( char === '?' )
output += '.';
else if ( char === '[' || char === ']' )
else if ( char === '[' ) {
output += char;
const next = input[i + 1];
if ( next === '!' ) {
i++;
output += '^';
}
} else if ( char === ']' )
output += char;
else if ( char === '{' ) {
@ -529,16 +547,16 @@ export function glob_to_regex(input) {
if ( count > 1 )
output += '.*?';
else
output += '[^ ]*?';
output += '[^\\s]*?';
} else
output += char;
}
while(groups > 0) {
/*while(groups > 0) {
output += ')';
groups--;
}
}*/
return output;
}