Add the very first dev-oriented setting and a DevSettingsConfig to manage it

This commit is contained in:
Oliver 2025-12-07 17:38:08 -07:00
parent 28d0105397
commit 5573a5b674
6 changed files with 120 additions and 1 deletions

View 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);
};
});