// SPDX-FileCopyrightText: 2021 Johannes Loher // // SPDX-License-Identifier: MIT import { packageName } from '../config'; export default function registerForRenderTokenConfigHook() { Hooks.on('renderTokenConfig', onRenderTokenConfig); } async function onRenderTokenConfig(app, html, data) { if (game.settings.get(packageName, 'configurationViaHeaderButton')) { return; } const contents = await renderTemplate( 'modules/darkness-dependent-vision/templates/darkness-dependent-vision-config-form-groups.hbs', data, ); html.find(`div[data-tab="vision"] .form-group`).last().after(contents); app.setPosition({ height: 'auto' }); }