summaryrefslogtreecommitdiff
path: root/ext/js/display/display-profile-selection.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2024-02-01 10:00:59 -0500
committerGitHub <noreply@github.com>2024-02-01 15:00:59 +0000
commitdfd42bad0b46845ad88d1fdc5fa82b4f03bab0f3 (patch)
tree04686b943b84b33b8927238be17e4bc0dda7eb62 /ext/js/display/display-profile-selection.js
parent2356223942a21d1683ac38eed8e7b9485f453d87 (diff)
Application refactor (#591)
* Rename Yomitan class to Application, change initialization style * Rename file * Update init * Update config * Remove dead code
Diffstat (limited to 'ext/js/display/display-profile-selection.js')
-rw-r--r--ext/js/display/display-profile-selection.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/js/display/display-profile-selection.js b/ext/js/display/display-profile-selection.js
index b61b49d5..3df79b74 100644
--- a/ext/js/display/display-profile-selection.js
+++ b/ext/js/display/display-profile-selection.js
@@ -20,7 +20,6 @@ import {EventListenerCollection} from '../core/event-listener-collection.js';
import {generateId} from '../core/utilities.js';
import {PanelElement} from '../dom/panel-element.js';
import {querySelectorNotNull} from '../dom/query-selector.js';
-import {yomitan} from '../yomitan.js';
export class DisplayProfileSelection {
/**
@@ -50,7 +49,7 @@ export class DisplayProfileSelection {
/** */
async prepare() {
- yomitan.on('optionsUpdated', this._onOptionsUpdated.bind(this));
+ this._display.application.on('optionsUpdated', this._onOptionsUpdated.bind(this));
this._profileButton.addEventListener('click', this._onProfileButtonClick.bind(this), false);
this._profileListNeedsUpdate = true;
}
@@ -92,7 +91,7 @@ export class DisplayProfileSelection {
/** */
async _updateProfileList() {
this._profileListNeedsUpdate = false;
- const options = await yomitan.api.optionsGetFull();
+ const options = await this._display.application.api.optionsGetFull();
this._eventListeners.removeAllEventListeners();
const displayGenerator = this._display.displayGenerator;
@@ -138,7 +137,7 @@ export class DisplayProfileSelection {
scope: 'global',
optionsContext: null
};
- await yomitan.api.modifySettings([modification], this._source);
+ await this._display.application.api.modifySettings([modification], this._source);
this._setProfilePanelVisible(false);
}
}