aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/settings.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/settings.js')
-rw-r--r--ext/bg/js/settings.js18
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);
}