From bd17b05eef0691f3f5ea618abb33da529e022dfd Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sun, 22 May 2016 16:53:28 -0700 Subject: Cleanup --- ext/bg/js/options-form.js | 32 ++++++++++++++++---------------- ext/bg/options.html | 30 +++++++++++++++--------------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/ext/bg/js/options-form.js b/ext/bg/js/options-form.js index 06be044a..1aa26384 100644 --- a/ext/bg/js/options-form.js +++ b/ext/bg/js/options-form.js @@ -22,20 +22,20 @@ function yomichan() { } function optionsToForm(opts) { - $('#activateOnStartup').prop('checked', opts.activateOnStartup); - $('#enableAnkiConnect').prop('checked', opts.enableAnkiConnect); - $('#loadEnamDict').prop('checked', opts.loadEnamDict); - $('#scanLength').val(opts.scanLength); - $('#selectMatchedText').prop('checked', opts.selectMatchedText); + $('#activate-on-startup').prop('checked', opts.activateOnStartup); + $('#enable-anki-connect').prop('checked', opts.enableAnkiConnect); + $('#load-enamdict').prop('checked', opts.loadEnamDict); + $('#scan-length').val(opts.scanLength); + $('#select-matched-text').prop('checked', opts.selectMatchedText); } function formToOptions() { return sanitizeOptions({ - activateOnStartup: $('#activateOnStartup').prop('checked'), - enableAnkiConnect: $('#enableAnkiConnect').prop('checked'), - loadEnamDict: $('#loadEnamDict').prop('checked'), - scanLength: $('#scanLength').val(), - selectMatchedText: $('#selectMatchedText').prop('checked') + activateOnStartup: $('#activate-on-startup').prop('checked'), + enableAnkiConnect: $('#enable-anki-connect').prop('checked'), + loadEnamDict: $('#load-enamdict').prop('checked'), + scanLength: $('#scan-length').val(), + selectMatchedText: $('#select-matched-text').prop('checked') }); } @@ -51,7 +51,7 @@ function updateAnkiFormVis(opts) { function populateAnkiDeckAndModel() { const yomi = yomichan(); - const ankiDeck = $('.ankiDeck'); + const ankiDeck = $('.anki-deck'); ankiDeck.find('option').remove(); yomi.api_getDeckNames({callback: (names) => { if (names !== null) { @@ -59,12 +59,12 @@ function populateAnkiDeckAndModel() { } }}); - const ankiModel = $('.ankiModel'); + const ankiModel = $('.anki-model'); ankiModel.find('option').remove(); yomi.api_getModelNames({callback: (names) => { if (names !== null) { names.forEach((name) => ankiModel.append($('