Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit 08a4424

Browse files
authored
maybe i should add async and await
1 parent ccef312 commit 08a4424

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

main.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ const loader_funcs = {
112112

113113
return { error: false };
114114
},
115-
startup: function(mods) {
115+
startup: async function(mods) {
116116
console.log(`%cRotisserie Mod Loader\n%cVersion: ${ml_vars.version}\n%cVersion Date: ${ml_vars.date}\nhttps://github.com/nilenta/rotisserie-modloader`, "font-size: 36px; font-weight: bold; color: lightgreen;", "font-size: 28px; color: lightblue;", "font-size: 24px; color: black;");
117117
console.log("")
118118
console.log("%cLoading client mods.", "font-size: 30px; font-weight: bold; color: lightblue;");
@@ -144,9 +144,9 @@ const loader_funcs = {
144144
if (node.nodeType === Node.ELEMENT_NODE) {
145145
const elements = node.querySelectorAll('*');
146146
elements.forEach((element) => {
147-
mods.forEach((pair) => {
147+
mods.forEach(async (pair) => {
148148
if (element.classList && element.classList.contains(pair.info.class_to_look_for) && pair.info.does_look_for_classes && pair?.started) {
149-
pair.callback(element);
149+
await pair.callback(element);
150150
}
151151
});
152152
});
@@ -193,4 +193,4 @@ let client_mods = [
193193
},
194194
*/
195195
];
196-
loader_funcs.startup(client_mods); // Yeah
196+
await loader_funcs.startup(client_mods); // Yeah

0 commit comments

Comments
 (0)