Add setting to prevent the UserConfig from opening on loading Foundry (closes #9)

This commit is contained in:
Eldritch-Oliver 2025-11-22 16:46:45 -07:00
parent c626c981aa
commit 857aca3423
5 changed files with 46 additions and 5 deletions

View file

@ -0,0 +1,12 @@
import { preventUserConfigOpen } from "../settings/preventUserConfigOpen.mjs";
// #region Once
Hooks.once(`renderUserConfig`, (app, element) => {
// MARK: Prevent Unready Open
if (!game.ready && preventUserConfigOpen.value()) {
element.style.display = `none`;
app.close();
};
});
// #endregion Once