summaryrefslogtreecommitdiff
path: root/ext/bg/js/yomichan.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-01-28 18:46:15 -0800
committerAlex Yatskov <alex@foosoft.net>2017-01-28 18:46:15 -0800
commit8efe5b1fbf6bf1539c93f25b6b87918c1a651f00 (patch)
tree6d407c4dc5dcb6d93ad38c10f2721d5d24ddd2a3 /ext/bg/js/yomichan.js
parentbf9925ec9cabd5a755152aa89df1f87e38d53534 (diff)
workaround for broken const in firefox
Diffstat (limited to 'ext/bg/js/yomichan.js')
-rw-r--r--ext/bg/js/yomichan.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/bg/js/yomichan.js b/ext/bg/js/yomichan.js
index d97dc586..d7bf0e80 100644
--- a/ext/bg/js/yomichan.js
+++ b/ext/bg/js/yomichan.js
@@ -81,7 +81,7 @@ class Yomichan {
tabInvokeAll(action, params) {
chrome.tabs.query({}, tabs => {
- for (const tab of tabs) {
+ for (let tab of tabs) {
chrome.tabs.sendMessage(tab.id, {action, params}, () => null);
}
});
@@ -106,7 +106,7 @@ class Yomichan {
fields: []
};
- for (const name in fields) {
+ for (let name in fields) {
if (fields[name].includes('{audio}')) {
audio.fields.push(name);
}
@@ -117,7 +117,7 @@ class Yomichan {
}
}
- for (const name in fields) {
+ for (let name in fields) {
note.fields[name] = formatField(
fields[name],
definition,
@@ -175,8 +175,8 @@ class Yomichan {
api_canAddDefinitions({definitions, modes, callback}) {
const notes = [];
- for (const definition of definitions) {
- for (const mode of modes) {
+ for (let definition of definitions) {
+ for (let mode of modes) {
notes.push(this.formatNote(definition, mode));
}
}