Fix: declare variables with const keyword

This commit is contained in:
Nikolay Belikov 2022-04-18 21:21:56 +03:00
parent a1c77ec29a
commit 18cf6bf2f7
7 changed files with 7 additions and 7 deletions

View file

@ -9,7 +9,7 @@
document.addEventListener('DOMContentLoaded', threeDots(), false);
function threeDots() {
for (hidden of document.querySelectorAll(".production b, .production strong")) {
for (const hidden of document.querySelectorAll(".production b, .production strong")) {
hidden.style.visibility = "visible";
hidden.innerText = "【" + hidden.innerText.replace(/[^ぁ-んァ-ン]/g, "") + "】";
}

View file

@ -99,7 +99,7 @@ Paints the question word according to its Pitch Accent number.
}
function paintTargetWord(color) {
for (word of document.querySelectorAll(".jpsentence b, .jpsentence strong")) {
for (const word of document.querySelectorAll(".jpsentence b, .jpsentence strong")) {
word.style.color = color;
// clear border on back side of cards
word.style["border"] = "0px";

View file

@ -27,7 +27,7 @@ Modified by Aleksa Sarai <cyphar@cyphar.com>.
<script>
function boxTargetWord() {
for (word of document.querySelectorAll(".jpsentence b, .jpsentence strong")) {
for (const word of document.querySelectorAll(".jpsentence b, .jpsentence strong")) {
word.style["border"] = "1px";
word.style["border-style"] = "dotted";
word.style["border-color"] = "#9a9a9a9a";

View file

@ -13,7 +13,7 @@
<script>
function threeDots() {
for (hidden of document.querySelectorAll(".production b, .production strong")) {
for (const hidden of document.querySelectorAll(".production b, .production strong")) {
hidden.style.visibility = "visible";
hidden.innerText = "【" + hidden.innerText.replace(/[^ぁ-んァ-ン]/g, "") + "】";
}

View file

@ -81,7 +81,7 @@ Sat Nov 27 11:10:04 AM UTC 2021
}
function paintTargetWord(color) {
for (word of document.querySelectorAll(".jpsentence b, .jpsentence strong")) {
for (const word of document.querySelectorAll(".jpsentence b, .jpsentence strong")) {
word.style.color = color;
}
}

View file

@ -13,7 +13,7 @@
<script>
function threeDots() {
for (hidden of document.querySelectorAll(".production b, .production strong")) {
for (const hidden of document.querySelectorAll(".production b, .production strong")) {
hidden.style.visibility = "visible";
hidden.innerText = "【" + hidden.innerText.replace(/[^ぁ-んァ-ン]/g, "") + "】";
}

View file

@ -67,7 +67,7 @@ Sat Nov 27 11:10:04 AM UTC 2021
}
function paintTargetWord(color) {
for (word of document.querySelectorAll(".jpsentence b, .jpsentence strong")) {
for (const word of document.querySelectorAll(".jpsentence b, .jpsentence strong")) {
word.style.color = color;
}
}