Apply settings before DOM loaded.

This commit is contained in:
Josh 2020-12-22 05:34:19 +10:00 committed by GitHub
parent 66ede7c5a0
commit e2d4c6d2b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,10 +94,13 @@ function updateSetting(element) {
}
}
for (const setting of settings) {
setting.load();
}
document.addEventListener('DOMContentLoaded', () => {
settingsModal = new Modal(document.querySelector('div#settings.modal'));
for (const setting of settings) {
setting.load();
setting.setElement();
}
});