diff options
author | Alex Yatskov <alex@foosoft.net> | 2016-06-14 16:07:23 -0400 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2016-06-14 20:44:38 -0700 |
commit | ad617221308b04e8f26ec52d876603e7aec3a03d (patch) | |
tree | 005364d7c5485a1b470530b55f90f4e5ed8d6f4c /ext/fg | |
parent | caf067883275f9b46259c2dbbf1f36aafc7e9108 (diff) |
Use `let` instead of `const` in for loops.
Diffstat (limited to 'ext/fg')
-rw-r--r-- | ext/fg/js/frame.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/fg/js/frame.js b/ext/fg/js/frame.js index 339958f2..9c4b9318 100644 --- a/ext/fg/js/frame.js +++ b/ext/fg/js/frame.js @@ -18,7 +18,7 @@ function registerKanjiLinks() { - for (const link of [].slice.call(document.getElementsByClassName('kanji-link'))) { + for (let link of [].slice.call(document.getElementsByClassName('kanji-link'))) { link.addEventListener('click', (e) => { e.preventDefault(); window.parent.postMessage({action: 'displayKanji', params: e.target.innerHTML}, '*'); @@ -27,7 +27,7 @@ function registerKanjiLinks() { } function registerAddNoteLinks() { - for (const link of [].slice.call(document.getElementsByClassName('action-add-note'))) { + for (let link of [].slice.call(document.getElementsByClassName('action-add-note'))) { link.addEventListener('click', (e) => { e.preventDefault(); const ds = e.currentTarget.dataset; @@ -37,7 +37,7 @@ function registerAddNoteLinks() { } function registerPronounceLinks() { - for (const link of [].slice.call(document.getElementsByClassName('action-pronounce'))) { + for (let link of [].slice.call(document.getElementsByClassName('action-pronounce'))) { link.addEventListener('click', (e) => { e.preventDefault(); const ds = e.currentTarget.dataset; @@ -60,7 +60,7 @@ function onMessage(e) { } function api_setActionState({index, state, sequence}) { - for (const mode in state) { + for (let mode in state) { const matches = document.querySelectorAll(`.action-bar[data-sequence="${sequence}"] .action-add-note[data-index="${index}"][data-mode="${mode}"]`); if (matches.length === 0) { return; |