From de9c72f7600f6063cbda15510d2b774370dcf40e Mon Sep 17 00:00:00 2001 From: adrien Date: Wed, 26 Apr 2023 00:06:07 +0200 Subject: [PATCH] settings arrangement --- app.js | 15 ++++++++------- index.html | 13 ++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app.js b/app.js index ba9357f..cfb7735 100644 --- a/app.js +++ b/app.js @@ -398,19 +398,20 @@ class Settings { } load() { - for (let input of this.form.getElementsByTagName("input")) { - if (localStorage[input.name]) input.value = localStorage[input.name] + for (let element of settingsForm.elements) { + if (element.name) { + if (localStorage[element.name]) element.value = localStorage[element.name] + } } - if (localStorage["stylesheet"]) stylesheetSelect.value = localStorage["stylesheet"] - document.selectedStyleSheetSet = stylesheetSelect.value } save() { - for (let input of this.form.getElementsByTagName("input")) { - localStorage[input.name] = input.value + for (let element of settingsForm.elements) { + if (element.name) { + localStorage[element.name] = element.value + } } - localStorage["stylesheet"] = stylesheetSelect.value } init() { diff --git a/index.html b/index.html index 79b9868..3372348 100644 --- a/index.html +++ b/index.html @@ -96,14 +96,13 @@ -
- Feuille de style - -
+
+ Thème +
@@ -228,8 +227,8 @@ Score Niveau Meilleur score Temps Lignes Lignes par minutes - Quatris Pirouettes - Plus grand enchaînement Plus grand bout à bout + Quatris Plus grand enchaînement + Pirouettes Plus grand bout à bout