Add setting to prevent the UserConfig from opening on loading Foundry (closes #9)
This commit is contained in:
parent
c626c981aa
commit
857aca3423
5 changed files with 46 additions and 5 deletions
12
module/hooks/renderUserConfig.mjs
Normal file
12
module/hooks/renderUserConfig.mjs
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue