Move some generic functions to a new package

This commit is contained in:
Ajay
2022-12-24 00:54:56 -05:00
parent 7bf17e1746
commit 7dd2c9eb3e
12 changed files with 71 additions and 106 deletions

View File

@@ -3,7 +3,7 @@ import { CategorySelection, SponsorTime, FetchResponse, BackgroundScriptContaine
import * as CompileConfig from "../config.json";
import { findValidElement, findValidElementFromSelector } from "./utils/pageUtils";
import { GenericUtils } from "./utils/genericUtils";
import { waitFor } from "@ajayyy/maze-utils";
export default class Utils {
@@ -31,7 +31,7 @@ export default class Utils {
}
async wait<T>(condition: () => T, timeout = 5000, check = 100): Promise<T> {
return GenericUtils.wait(condition, timeout, check);
return waitFor(condition, timeout, check);
}
/* Uses a mutation observer to wait asynchronously */