mirror of
https://github.com/NovaGM/ModuleBuilder.git
synced 2024-08-15 00:23:33 +00:00
16 lines
No EOL
321 B
JavaScript
16 lines
No EOL
321 B
JavaScript
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
|
|
|
|
module.exports = {
|
|
sleep,
|
|
|
|
waitFor: async (query) => {
|
|
while (true) {
|
|
const el = document.querySelector(query);
|
|
if (el) return el;
|
|
|
|
await sleep(5);
|
|
}
|
|
},
|
|
|
|
...goosemodScope.reactUtils // Export GooseMod React utils
|
|
}; |