1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-28 15:27:43 +00:00
* Added: Option to hide channels from the directory based on their title.
* Fixed: Issue with FrankerFaceZ failing to initialize correctly due to a change in Twitch's JS layout.
This commit is contained in:
SirStendec 2022-06-08 23:07:07 -04:00
parent 213c2195cc
commit bcee12a6b3
8 changed files with 158 additions and 25 deletions

View file

@ -1,6 +1,6 @@
'use strict';
import {BAD_HOTKEYS, TWITCH_EMOTE_V2} from 'utilities/constants';
import {BAD_HOTKEYS, TWITCH_EMOTE_V2, WORD_SEPARATORS} from 'utilities/constants';
const HOP = Object.prototype.hasOwnProperty;
@ -539,6 +539,11 @@ export const escape_regex = RegExp.escape || function escape_regex(str) {
}
export function addWordSeparators(str) {
return `(^|.*?${WORD_SEPARATORS})(?:${str})(?=$|${WORD_SEPARATORS})`
}
const CONTROL_CHARS = '/$^+.()=!|';
export function glob_to_regex(input) {