diff options
author | Alex Yatskov <alex@foosoft.net> | 2016-11-06 17:10:31 -0800 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2016-11-06 17:10:31 -0800 |
commit | fd6622400f64b2d568d38bde72f9fd75f8d06beb (patch) | |
tree | 35c7772acc0b37e56196138207bf4e73a5061d5d /ext/bg/js/util.js | |
parent | 5172155c7813965ca8f896940fa30e613f08ebac (diff) |
Templates
Diffstat (limited to 'ext/bg/js/util.js')
-rw-r--r-- | ext/bg/js/util.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js index eaa7dd01..e99cdeab 100644 --- a/ext/bg/js/util.js +++ b/ext/bg/js/util.js @@ -121,7 +121,13 @@ function importJsonDb(indexUrl, indexLoaded, termsLoaded, kanjiLoaded) { const indexDir = indexUrl.slice(0, indexUrl.lastIndexOf('/')); return loadJson(indexUrl).then(index => { if (indexLoaded !== null) { - return indexLoaded(index.title, index.version).then(() => index); + return indexLoaded( + index.title, + index.version, + index.entities, + index.termBanks > 0, + index.kanjiBanks > 0 + ).then(() => index); } return index; @@ -134,7 +140,6 @@ function importJsonDb(indexUrl, indexLoaded, termsLoaded, kanjiLoaded) { const bankUrl = `${indexDir}/term_bank_${i}.json`; loaders.push(() => loadJson(bankUrl).then(entries => termsLoaded( index.title, - index.version, entries, banksTotal, banksLoaded++ @@ -145,7 +150,6 @@ function importJsonDb(indexUrl, indexLoaded, termsLoaded, kanjiLoaded) { const bankUrl = `${indexDir}/kanji_bank_${i}.json`; loaders.push(() => loadJson(bankUrl).then(entries => kanjiLoaded( index.title, - index.version, entries, banksTotal, banksLoaded++ |