diff options
author | Alex Yatskov <alex@foosoft.net> | 2017-08-05 19:02:03 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2017-08-05 19:02:03 -0700 |
commit | 8e1c6776d1a6149c222ac0bda6b7b0d373453d11 (patch) | |
tree | 9949fff56e1efe9ecc50b6b598e1769a61ec5af4 /ext/bg/js/settings.js | |
parent | 257c864bb5ca5ef9afb4d92b9d29a7f479bc50b4 (diff) |
more cleanup
Diffstat (limited to 'ext/bg/js/settings.js')
-rw-r--r-- | ext/bg/js/settings.js | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/ext/bg/js/settings.js b/ext/bg/js/settings.js index fa44c8da..1edbab01 100644 --- a/ext/bg/js/settings.js +++ b/ext/bg/js/settings.js @@ -22,33 +22,27 @@ */ function utilAnkiGetModelNames() { - const yomichan = chrome.extension.getBackgroundPage().yomichan; - return yomichan.anki.getModelNames(); + return backend().anki.getModelNames(); } function utilAnkiGetDeckNames() { - const yomichan = chrome.extension.getBackgroundPage().yomichan; - return yomichan.anki.getDeckNames(); + return backend().anki.getDeckNames(); } function utilAnkiGetModelFieldNames(modelName) { - const yomichan = chrome.extension.getBackgroundPage().yomichan; - return yomichan.anki.getModelFieldNames(modelName); + return backend().anki.getModelFieldNames(modelName); } function utilDatabaseGetDictionaries() { - const yomichan = chrome.extension.getBackgroundPage().yomichan; - return yomichan.translator.database.getDictionaries(); + return backend().translator.database.getDictionaries(); } function utilDatabasePurge() { - const yomichan = chrome.extension.getBackgroundPage().yomichan; - return yomichan.translator.database.purge(); + return backend().translator.database.purge(); } function utilDatabaseImport(data, progress) { - const yomichan = chrome.extension.getBackgroundPage().yomichan; - return yomichan.translator.database.importDictionary(data, progress); + return backend().translator.database.importDictionary(data, progress); } |