diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/bg/dictionary.js | 4 | ||||
-rw-r--r-- | ext/bg/translator.js | 4 | ||||
-rw-r--r-- | ext/bg/yomichan.js | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/ext/bg/dictionary.js b/ext/bg/dictionary.js index d1b9e6b1..1264263a 100644 --- a/ext/bg/dictionary.js +++ b/ext/bg/dictionary.js @@ -28,7 +28,7 @@ class Dictionary { addTermData(terms) { let index = this.terms.length; - for (const [e, r, g, t] in terms) { + for (const [e, r, g, t] of terms) { this.storeIndex(this.termIndices, e, index); this.storeIndex(this.termIndices, r, index++); this.terms.push([e, r, g, t]); @@ -37,7 +37,7 @@ class Dictionary { addKanjiData(kanji) { let index = this.kanji.length; - for (const [c, k, o, g] in kanji) { + for (const [c, k, o, g] of kanji) { this.storeIndex(this.kanjiIndices, c, index++); this.kanji.push([c, k, o, g]); } diff --git a/ext/bg/translator.js b/ext/bg/translator.js index b03297cb..e76a1b07 100644 --- a/ext/bg/translator.js +++ b/ext/bg/translator.js @@ -42,7 +42,7 @@ class Translator { break; case 'edict': case 'enamdict': - this.dictionary.addTermsData(Translator.parseCsv(response)); + this.dictionary.addTermData(Translator.parseCsv(response)); break; } @@ -159,7 +159,7 @@ class Translator { static parseCsv(data) { const result = []; - for (const row in data.split('\n')) { + for (const row of data.split('\n')) { result.push(row.split('\t')); } diff --git a/ext/bg/yomichan.js b/ext/bg/yomichan.js index 8d989078..43ee8761 100644 --- a/ext/bg/yomichan.js +++ b/ext/bg/yomichan.js @@ -21,9 +21,9 @@ class Yomichan { constructor() { this.res = { rules: 'bg/data/rules.json', - edict: 'bg/data/edict.json', - enamdict: 'bg/data/enamdict.json', - kanjidic: 'bg/data/kanjidic.json' + edict: 'bg/data/edict.csv', + enamdict: 'bg/data/enamdict.csv', + kanjidic: 'bg/data/kanjidic.csv' }; this.translator = new Translator(); |