diff --git a/index.html b/index.html index d29b4cf..664cb04 100644 --- a/index.html +++ b/index.html @@ -144,7 +144,7 @@ MIT License. Source code available on git. -
v1.3.1
+
v1.3.2
@@ -508,12 +508,14 @@ onToggle(isOpened) { super.onToggle(isOpened); if (isOpened) centuryInput.selectInput(); + centuryInput.updateTitle(); } }("century", $("#century-details")); const yearDetails = new class extends ToggleableSection { onToggle(isOpened) { super.onToggle(isOpened); if (isOpened) yearInput.selectInput(); + yearInput.updateTitle(); } }("year", $("#year-details")); @@ -539,7 +541,10 @@ } updateTitle() { - this.titleLabel.innerText = `Anchor day of century starting in ${quizDate.getCentury() * 100}?`; + if (centuryDetails.isOpened()) + this.titleLabel.innerText = `Anchor day of century starting in ${quizDate.getCentury() * 100}?`; + else + this.titleLabel.innerText = `Century`; } }($("#century-input"), $("#century-title-label"), $("#century-submit")); const yearInput = new class extends ValidatableInput { @@ -561,7 +566,10 @@ } updateTitle() { - this.titleLabel.innerText = `Doomsday of year ${quizDate.date.getFullYear()}?`; + if (yearDetails.isOpened()) + this.titleLabel.innerText = `Doomsday of year ${quizDate.date.getFullYear()}?`; + else + this.titleLabel.innerText = `Year`; } }($("#year-input"), $("#year-title-label"), $("#year-submit")); const dayInput = new class extends ValidatableInput {