Add the very first dev-oriented setting and a DevSettingsConfig to manage it
This commit is contained in:
parent
28d0105397
commit
5573a5b674
6 changed files with 120 additions and 1 deletions
19
module/hooks/renderSettingsConfig.mjs
Normal file
19
module/hooks/renderSettingsConfig.mjs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { __ID__ } from "../consts.mjs";
|
||||
|
||||
/*
|
||||
Repositions the dev settings menu entry to the bottom of the settings list to
|
||||
prevent it from being as attention-grabbing compared to being at the top of the
|
||||
list.
|
||||
*/
|
||||
Hooks.on(`renderSettingsConfig`, (app) => {
|
||||
/** @type {Node | undefined} */
|
||||
const settingList = app.element.querySelector(`.tab[data-group="categories"][data-tab="oft"]`);
|
||||
|
||||
|
||||
// MARK: devSettings Menu
|
||||
/** @type {Node | undefined} */
|
||||
const devSettingsMenu = app.element.querySelector(`.form-group:has(button[data-key="${__ID__}.devSettings"])`);
|
||||
if (settingList && devSettingsMenu) {
|
||||
settingList.appendChild(devSettingsMenu);
|
||||
};
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue