diff --git a/ext/bg/js/settings-dictionaries.js b/ext/bg/js/settings-dictionaries.js index 635b95c6..72a27475 100644 --- a/ext/bg/js/settings-dictionaries.js +++ b/ext/bg/js/settings-dictionaries.js @@ -256,7 +256,8 @@ async function dictSettingsInitialize() { ); dictionaryUI.save = () => apiOptionsSave(); - document.querySelector('#dict-purge-link').addEventListener('click', (e) => onDictionaryPurge(e), false); + document.querySelector('#dict-purge-button').addEventListener('click', (e) => onDictionaryPurgeButtonClick(e), false); + document.querySelector('#dict-purge-confirm').addEventListener('click', (e) => onDictionaryPurge(e), false); document.querySelector('#dict-file-button').addEventListener('click', (e) => onDictionaryImportButtonClick(e), false); document.querySelector('#dict-file').addEventListener('change', (e) => onDictionaryImport(e), false); document.querySelector('#dict-main').addEventListener('change', (e) => onDictionaryMainChanged(e), false); @@ -398,9 +399,16 @@ function onDictionaryImportButtonClick() { dictFile.click(); } +function onDictionaryPurgeButtonClick(e) { + e.preventDefault(); + $('#dict-purge-modal').modal('show'); +} + async function onDictionaryPurge(e) { e.preventDefault(); + $('#dict-purge-modal').modal('hide'); + const dictControls = $('#dict-importer, #dict-groups, #dict-groups-extra, #dict-main-group').hide(); const dictProgress = $('#dict-purge').show(); diff --git a/ext/bg/settings.html b/ext/bg/settings.html index 7ac196f2..fb39e5c3 100644 --- a/ext/bg/settings.html +++ b/ext/bg/settings.html @@ -417,10 +417,7 @@

- Yomichan can import and use a variety of dictionary formats. Unneeded dictionaries can be disabled, - or you can simply purge the database to delete everything. -

-

+ Yomichan can import and use a variety of dictionary formats. Unneeded dictionaries can be disabled. Deleting individual dictionaries is not currently feasible due to limitations of browser database technology.

@@ -449,10 +446,31 @@ download free dictionaries for use with this extension and to learn about importing proprietary EPWING dictionaries.

- +
+ + +
+ +