From b862035fbc20449786a14f3f0b82828b8eb73c5c Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 23 Nov 2019 23:23:08 -0500 Subject: Show info about whether a dictionary supports wildcard searches --- ext/bg/js/database.js | 9 ++++++--- ext/bg/js/settings/dictionaries.js | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'ext/bg/js') diff --git a/ext/bg/js/database.js b/ext/bg/js/database.js index c6717560..2f624189 100644 --- a/ext/bg/js/database.js +++ b/ext/bg/js/database.js @@ -503,7 +503,8 @@ class Database { termMetaDataLoaded, kanjiDataLoaded, kanjiMetaDataLoaded, - tagDataLoaded + tagDataLoaded, + details ); } @@ -520,7 +521,8 @@ class Database { termMetaDataLoaded, kanjiDataLoaded, kanjiMetaDataLoaded, - tagDataLoaded + tagDataLoaded, + details ) { const zip = await JSZip.loadAsync(archive); @@ -538,7 +540,8 @@ class Database { title: index.title, revision: index.revision, sequenced: index.sequenced, - version: index.format || index.version + version: index.format || index.version, + prefixWildcardsSupported: !!details.prefixWildcardsSupported }; await indexDataLoaded(summary); diff --git a/ext/bg/js/settings/dictionaries.js b/ext/bg/js/settings/dictionaries.js index 926b05b7..b5e663ea 100644 --- a/ext/bg/js/settings/dictionaries.js +++ b/ext/bg/js/settings/dictionaries.js @@ -189,6 +189,7 @@ class SettingsDictionaryEntryUI { this.content.querySelector('.dict-title').textContent = this.dictionaryInfo.title; this.content.querySelector('.dict-revision').textContent = `rev.${this.dictionaryInfo.revision}`; + this.content.querySelector('.dict-prefix-wildcard-searches-supported').checked = !!this.dictionaryInfo.prefixWildcardsSupported; this.applyValues(); -- cgit v1.2.3