summaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/dictionary-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/settings/dictionary-controller.js')
-rw-r--r--ext/bg/js/settings/dictionary-controller.js10
1 files changed, 2 insertions, 8 deletions
diff --git a/ext/bg/js/settings/dictionary-controller.js b/ext/bg/js/settings/dictionary-controller.js
index 7a71a02a..cbbd0a8e 100644
--- a/ext/bg/js/settings/dictionary-controller.js
+++ b/ext/bg/js/settings/dictionary-controller.js
@@ -293,7 +293,7 @@ class DictionaryController {
}
_createExtra(totalCounts, remainders, totalRemainder) {
- const node = this._instantiateTemplate('#dict-extra-template');
+ const node = this._settingsController.instantiateTemplate('dict-extra');
this._integrityExtraInfoNode = node;
node.querySelector('.dict-total-count').textContent = `${totalRemainder} item${totalRemainder !== 1 ? 's' : ''}`;
@@ -317,7 +317,7 @@ class DictionaryController {
}
_createDictionaryEntry(dictionary) {
- const node = this._instantiateTemplate('#dict-template');
+ const node = this._settingsController.instantiateTemplate('dict');
this._dictionaryEntryContainer.appendChild(node);
const entry = new DictionaryEntry(this, node, dictionary);
@@ -369,12 +369,6 @@ class DictionaryController {
}
}
- _instantiateTemplate(templateSelector) {
- const template = document.querySelector(templateSelector);
- const content = document.importNode(template.content, true);
- return content.firstChild;
- }
-
async _deleteDictionaryInternal(dictionaryTitle, onProgress) {
const dictionaryDatabase = await this._getPreparedDictionaryDatabase();
try {