summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-11-23 23:23:08 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-07 14:34:35 -0500
commitb862035fbc20449786a14f3f0b82828b8eb73c5c (patch)
tree2d806305704946a7a916f69ab9f35da17d8a00c3 /ext
parent1a0a345ae745781b6fb1d066df334b641a9cc00b (diff)
Show info about whether a dictionary supports wildcard searches
Diffstat (limited to 'ext')
-rw-r--r--ext/bg/js/database.js9
-rw-r--r--ext/bg/js/settings/dictionaries.js1
-rw-r--r--ext/bg/settings.html3
3 files changed, 10 insertions, 3 deletions
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();
diff --git a/ext/bg/settings.html b/ext/bg/settings.html
index ac19a020..ea34b208 100644
--- a/ext/bg/settings.html
+++ b/ext/bg/settings.html
@@ -550,6 +550,9 @@
<div class="checkbox options-advanced">
<label><input type="checkbox" class="dict-allow-secondary-searches"> Allow secondary searches</label>
</div>
+ <div class="checkbox dict-prefix-wildcard-searches-supported-container">
+ <label><input type="checkbox" class="dict-prefix-wildcard-searches-supported" disabled> Prefix wildcard searches supported</label>
+ </div>
<div class="form-group options-advanced">
<label class="dict-result-priority-label">Result priority</label>
<input type="number" class="form-control dict-priority">