Merged Lartza/min-duration

This commit is contained in:
Joe Dowd
2020-02-09 01:02:40 +00:00
6 changed files with 83 additions and 4 deletions

View File

@@ -91,6 +91,24 @@ async function init() {
break;
case "display":
updateDisplayElement(<HTMLElement> optionsElements[i])
break;
case "number-change":
let numberChangeOption = optionsElements[i].getAttribute("sync-option");
let configValue = Config.config[numberChangeOption];
let numberInput = optionsElements[i].querySelector("input");
if (isNaN(configValue) || configValue < 0) {
numberInput.value = Config.defaults[numberChangeOption];
} else {
numberInput.value = configValue;
}
numberInput.addEventListener("input", () => {
Config.config[numberChangeOption] = numberInput.value;
});
break;
}
}
@@ -321,4 +339,4 @@ function activateTextChange(element: HTMLElement) {
});
element.querySelector(".option-hidden-section").classList.remove("hidden");
}
}