diff options
author | Alex Yatskov <alex@foosoft.net> | 2017-09-22 19:39:05 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2017-09-22 19:39:05 -0700 |
commit | 8ba8397170c99e1d4416277e26d91ebb4b8cfed1 (patch) | |
tree | cdb0dc4ce57c984d5db2db7361a25c9b30bb542f /ext/bg/js/settings.js | |
parent | 27296de9f5c8283e81620999d8acedcdf9c117a5 (diff) |
update error handling
Diffstat (limited to 'ext/bg/js/settings.js')
-rw-r--r-- | ext/bg/js/settings.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/bg/js/settings.js b/ext/bg/js/settings.js index d73d7509..161e9abe 100644 --- a/ext/bg/js/settings.js +++ b/ext/bg/js/settings.js @@ -142,7 +142,7 @@ async function onReady() { $('#scan-length').val(options.scanning.length); $('#scan-modifier-key').val(options.scanning.modifier); - $('#dict-purge').click(utilAsync(onDictionaryPurge)); + $('#dict-purge-link').click(utilAsync(onDictionaryPurge)); $('#dict-file').change(utilAsync(onDictionaryImport)); $('#anki-enable').prop('checked', options.anki.enable); @@ -179,7 +179,7 @@ $(document).ready(utilAsync(onReady)); function dictionaryErrorShow(error) { const dialog = $('#dict-error'); if (error) { - dialog.show().find('span').text(error); + dialog.show().text(error); } else { dialog.hide(); } @@ -245,7 +245,7 @@ async function onDictionaryPurge(e) { e.preventDefault(); const dictControls = $('#dict-importer, #dict-groups').hide(); - const dictProgress = $('#dict-purge-progress').show(); + const dictProgress = $('#dict-purge').show(); try { dictionaryErrorShow(); @@ -314,7 +314,7 @@ function ankiSpinnerShow(show) { function ankiErrorShow(error) { const dialog = $('#anki-error'); if (error) { - dialog.show().find('span').text(error); + dialog.show().text(error); } else { dialog.hide(); |