From ad54735a80ede1980eca4ab51273256c5fd8d3bd Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sat, 21 May 2016 17:11:17 -0700 Subject: [PATCH] WIP --- ext/bg/js/options-form.js | 20 ++++++++++++++++++++ ext/bg/js/yomichan.js | 24 +++++++++++++++++------- ext/bg/options.html | 6 +++--- 3 files changed, 40 insertions(+), 10 deletions(-) diff --git a/ext/bg/js/options-form.js b/ext/bg/js/options-form.js index fec2494a..a77419ff 100644 --- a/ext/bg/js/options-form.js +++ b/ext/bg/js/options-form.js @@ -43,6 +43,25 @@ function updateVisibility() { } } +function updateAnkiPage() { + const yomichan = chrome.extension.getBackgroundPage().yomichan; + + $('#ankiDeck').find('option').remove(); + $('#ankiModel').find('option').remove(); + + yomichan.getDeckNames((names) => { + names.forEach((name) => { + $('#ankiDeck').append($('