refactor: Improve for...of
This commit is contained in:
parent
afcb06a808
commit
e698161a2d
2 changed files with 7 additions and 7 deletions
|
|
@ -192,13 +192,13 @@ function composeMail(tag, name, prov, suffix, text, topic) {
|
||||||
el.innerHTML = elContent + text;
|
el.innerHTML = elContent + text;
|
||||||
el.setAttribute('href', 'mailto:' + mailString + topic);
|
el.setAttribute('href', 'mailto:' + mailString + topic);
|
||||||
} else {
|
} else {
|
||||||
const els = document.getElementsByClassName(tag.slice(1));
|
const elements = document.getElementsByClassName(tag.slice(1));
|
||||||
|
|
||||||
for (let el of els) {
|
for (const element of elements) {
|
||||||
const elContent = el.innerHTML;
|
const content = element.innerHTML;
|
||||||
|
|
||||||
el.innerHTML = elContent + text;
|
element.innerHTML = content + text;
|
||||||
el.setAttribute('href', 'mailto:' + mailString + topic);
|
element.setAttribute('href', 'mailto:' + mailString + topic);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -231,7 +231,7 @@ tags:
|
||||||
const groupTarget = event.target.closest('[name="group"]');
|
const groupTarget = event.target.closest('[name="group"]');
|
||||||
|
|
||||||
if (rowTarget && event.button === 0) {
|
if (rowTarget && event.button === 0) {
|
||||||
for (row of rows) {
|
for (const row of rows) {
|
||||||
row.classList.remove('active');
|
row.classList.remove('active');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -296,7 +296,7 @@ tags:
|
||||||
const cells = content.querySelectorAll('th:first-child');
|
const cells = content.querySelectorAll('th:first-child');
|
||||||
const isHidden = cells[0].classList.contains('di_none');
|
const isHidden = cells[0].classList.contains('di_none');
|
||||||
|
|
||||||
for (cell of cells) {
|
for (const cell of cells) {
|
||||||
if (isHidden) {
|
if (isHidden) {
|
||||||
cell.classList.remove('di_none');
|
cell.classList.remove('di_none');
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue