aboutsummaryrefslogtreecommitdiff
path: root/ext/js/pages
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2024-02-18 08:10:09 -0500
committerGitHub <noreply@github.com>2024-02-18 13:10:09 +0000
commit6cf38229b54efbbc3ae7bc174c3999f9dfa7b1d2 (patch)
tree1d47e64bf80ef2f7fd082dde956d0b214946f189 /ext/js/pages
parentc48cd6ff6d8dcced7baf1b27ce3ac2449944f5d7 (diff)
Html templates update (#707)
* Simplify display template loading * Add helper * Rename file * Rename for simplicity * Create templates file * Load * Remove templates * Move permissions templates * Remove "templates" from comments * Fix prepare
Diffstat (limited to 'ext/js/pages')
-rw-r--r--ext/js/pages/settings/settings-controller.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/js/pages/settings/settings-controller.js b/ext/js/pages/settings/settings-controller.js
index c835f8e6..d0cfd838 100644
--- a/ext/js/pages/settings/settings-controller.js
+++ b/ext/js/pages/settings/settings-controller.js
@@ -44,7 +44,6 @@ export class SettingsController extends EventDispatcher {
this._pageExitPreventionEventListeners = new EventListenerCollection();
/** @type {HtmlTemplateCollection} */
this._templates = new HtmlTemplateCollection();
- this._templates.load(document);
}
/** @type {import('../../application.js').Application} */
@@ -69,6 +68,7 @@ export class SettingsController extends EventDispatcher {
/** */
async prepare() {
+ await this._templates.loadFromFiles(['/templates-settings.html']);
this._application.on('optionsUpdated', this._onOptionsUpdated.bind(this));
if (this._canObservePermissionsChanges()) {
chrome.permissions.onAdded.addListener(this._onPermissionsChanged.bind(this));