Also move the TacUtils class into the namespace for consistency

This commit is contained in:
DominikDoom
2025-07-12 19:01:13 +02:00
parent 87fa3851ca
commit 88c8a1d5d6
11 changed files with 76 additions and 78 deletions

View File

@@ -13,7 +13,7 @@
.replace("<c:", "")
.replace("<", "");
let filterCondition = (x) => {
let regex = new RegExp(TacUtils.escapeRegExp(searchTerm, true), "i");
let regex = new RegExp(TAC.Utils.escapeRegExp(searchTerm, true), "i");
return regex.test(x.terms.toLowerCase()) || regex.test(x.name.toLowerCase());
};
tempResults = TAC.Globals.chants.filter((x) => filterCondition(x)); // Filter by tagword
@@ -38,7 +38,7 @@
async function load() {
if (TAC.CFG.chantFile && TAC.CFG.chantFile !== "None") {
try {
TAC.Globals.chants = await TacUtils.readFile(
TAC.Globals.chants = await TAC.Utils.readFile(
`${TAC.Globals.tagBasePath}/${TAC.CFG.chantFile}?`,
true
);