Parcourir la source

Allow subcategories to be on by default; fix spurious export of default-true subcategories

tags/v1.1.0
Fen Dweller il y a 5 ans
Parent
révision
8f3ba09a2c
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. +5
    -1
      game.js

+ 5
- 1
game.js Voir le fichier

@@ -4844,7 +4844,7 @@ function recurseDeletePanel(settings, panel) {
}
panel.entries.forEach(option => {
if (option.type == "subcategory") {
if (!settings[option.id]) {
if (settings[option.id] == option.default || (!settings[option.id] && option.default === undefined)) {
delete settings[option.id];
}
recurseDeletePanel(settings, option);
@@ -5612,6 +5612,10 @@ function render_subcategory_option(li, option) {
sub_input.setAttribute("name", option.id);
sub_input.setAttribute("type", "checkbox");

if (option.default === true) {
sub_input.setAttribute("checked", true);
}

let sub_label = document.createElement("label");
sub_label.classList.add("custom-header");
sub_label.setAttribute("for", option.id);


Chargement…
Annuler
Enregistrer