23 lines
664 B
JavaScript
23 lines
664 B
JavaScript
// SPDX-FileCopyrightText: 2021 Johannes Loher
|
|
//
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
import { packageName } from './config';
|
|
|
|
export default function registerSettings() {
|
|
game.settings.register(packageName, 'configurationViaHeaderButton', {
|
|
name: 'DarknessDependentVision.ConfigurationViaHeaderButtonName',
|
|
hint: 'DarknessDependentVision.ConfigurationViaHeaderButtonHint',
|
|
scope: 'client',
|
|
config: true,
|
|
type: Boolean,
|
|
default: true,
|
|
onChange: () =>
|
|
Object.values(ui.windows)
|
|
.filter((w) => w instanceof TokenConfig)
|
|
.forEach(async (w) => {
|
|
await w.close();
|
|
w.render(true);
|
|
}),
|
|
});
|
|
}
|