chore(modloader): avoid repeat logging on menu load

This commit is contained in:
dragonwocky 2023-01-11 22:02:25 +11:00
parent 881f69c47d
commit 5db238024a
Signed by: dragonwocky
GPG Key ID: 7998D08F7D7BD7A8

View File

@ -7,8 +7,6 @@
"use strict";
(async () => {
console.log("notion-enhancer: loading...");
// prettier-ignore
const { enhancerUrl } = globalThis.__enhancerApi,
isMenu = location.href.startsWith(enhancerUrl("/core/menu/index.html")),
@ -16,6 +14,9 @@
signedIn = localStorage["LRU:KeyValueStore2:current-user-id"];
if (!isMenu && !(signedIn && pageLoaded)) return;
// avoid repeat logging
if (!isMenu) console.log("notion-enhancer: loading...");
await import("./vendor/twind.min.js");
await import("./vendor/lucide.min.js");
await import("./vendor/htm.min.js");
@ -49,5 +50,6 @@
}
}
console.log("notion-enhancer: ready");
// consider "ready" after menu has loaded
if (isMenu) console.log("notion-enhancer: ready");
})();