aboutsummaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2024-02-09 19:00:31 -0500
committertdro <tdro@noreply.example.com>2024-02-09 19:00:31 -0500
commit9ff0d7f3243eecaff0b354b392fa1e3ef4784098 (patch)
tree51123f77b93ab67ad9cd2cb032294ffa149cf5f2 /static
parenta0e27279c740611b7a6a47a6a419abbb1559ae6c (diff)
downloadcanory-9ff0d7f3243eecaff0b354b392fa1e3ef4784098.tar.gz
canory-9ff0d7f3243eecaff0b354b392fa1e3ef4784098.tar.bz2
canory-9ff0d7f3243eecaff0b354b392fa1e3ef4784098.zip
static/js/forms: Use var on loops
Avoid minification breaking scripts on browsers that have shadowing issues
Diffstat (limited to 'static')
-rw-r--r--static/js/forms.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/static/js/forms.ts b/static/js/forms.ts
index 3b1aedc..c9fc963 100644
--- a/static/js/forms.ts
+++ b/static/js/forms.ts
@@ -16,7 +16,7 @@
const states = input.concat(select).concat(textarea);
- for (let i = 0; i < states.length; i++) {
+ for (var i = 0; i < states.length; i++) {
if (localStorage[states[i].id]) {
if (states[i].type === "radio" || states[i].type === "checkbox") {
@@ -38,9 +38,9 @@
const group = document.querySelectorAll(`input[name='${event.target.name}']`);
- for (let i = 0; i < group.length; i++) {
- if ((group[i].type === "radio" || group[i].type === "checkbox") && !group[i].checked) {
- localStorage[group[i].id] = "off";
+ for (var j = 0; j < group.length; j++) {
+ if ((group[j].type === "radio" || group[j].type === "checkbox") && !group[j].checked) {
+ localStorage[group[j].id] = "off";
}
}
self.dispatchEvent(new Event("storage"));