Open toggleables by default

Fixes #8.
This commit is contained in:
Florine W. Dekker 2020-08-11 11:22:52 +02:00
parent 4cef9c30fd
commit 122bf8dfc8
Signed by: FWDekker
GPG Key ID: B1B567AF58D6EE0F
4 changed files with 6 additions and 5 deletions

BIN
package-lock.json generated

Binary file not shown.

View File

@ -1,6 +1,6 @@
{
"name": "doomsday",
"version": "1.3.7",
"version": "1.3.8",
"description": "Test your mastery of Conway's Doomsday rule.",
"author": "Felix W. Dekker",
"browser": "dist/bundle.js",
@ -26,8 +26,8 @@
"grunt-contrib-watch": "^1.1.0",
"grunt-focus": "^1.0.0",
"grunt-text-replace": "^0.4.0",
"grunt-webpack": "^3.1.3",
"webpack": "^4.43.0",
"grunt-webpack": "^4.0.2",
"webpack": "^4.44.1",
"webpack-cli": "^3.3.12"
}
}

View File

@ -82,6 +82,6 @@
<!-- Scripts -->
<script src="bundle.js"></script>
<script src="bundle.js?v=%%VERSION_NUMBER%%"></script>
</body>
</html>

View File

@ -213,7 +213,8 @@ class ToggleableSection {
*/
_loadToggle() {
const target = localStorage.getItem(`/tools/doomsday//toggle-${this._name}`);
if (target === undefined) {
if (target === null) {
this.setOpened(true);
this._storeToggle();
return;
}