mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-18 18:59:01 +00:00
chore(modloader): avoid repeat logging on menu load
This commit is contained in:
parent
881f69c47d
commit
5db238024a
@ -7,8 +7,6 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
console.log("notion-enhancer: loading...");
|
|
||||||
|
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
const { enhancerUrl } = globalThis.__enhancerApi,
|
const { enhancerUrl } = globalThis.__enhancerApi,
|
||||||
isMenu = location.href.startsWith(enhancerUrl("/core/menu/index.html")),
|
isMenu = location.href.startsWith(enhancerUrl("/core/menu/index.html")),
|
||||||
@ -16,6 +14,9 @@
|
|||||||
signedIn = localStorage["LRU:KeyValueStore2:current-user-id"];
|
signedIn = localStorage["LRU:KeyValueStore2:current-user-id"];
|
||||||
if (!isMenu && !(signedIn && pageLoaded)) return;
|
if (!isMenu && !(signedIn && pageLoaded)) return;
|
||||||
|
|
||||||
|
// avoid repeat logging
|
||||||
|
if (!isMenu) console.log("notion-enhancer: loading...");
|
||||||
|
|
||||||
await import("./vendor/twind.min.js");
|
await import("./vendor/twind.min.js");
|
||||||
await import("./vendor/lucide.min.js");
|
await import("./vendor/lucide.min.js");
|
||||||
await import("./vendor/htm.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");
|
||||||
})();
|
})();
|
||||||
|
Loading…
Reference in New Issue
Block a user