aboutsummaryrefslogtreecommitdiff
path: root/ext/js/display/search-display-controller.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/search-display-controller.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/search-display-controller.js')
-rw-r--r--ext/js/display/search-display-controller.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/ext/js/display/search-display-controller.js b/ext/js/display/search-display-controller.js
index ff4340c1..49c69520 100644
--- a/ext/js/display/search-display-controller.js
+++ b/ext/js/display/search-display-controller.js
@@ -21,7 +21,6 @@ import {ClipboardMonitor} from '../comm/clipboard-monitor.js';
import {createApiMap, invokeApiMapHandler} from '../core/api-map.js';
import {EventListenerCollection} from '../core/event-listener-collection.js';
import {querySelectorNotNull} from '../dom/query-selector.js';
-import {yomitan} from '../yomitan.js';
export class SearchDisplayController {
/**
@@ -71,7 +70,7 @@ export class SearchDisplayController {
/** @type {ClipboardMonitor} */
this._clipboardMonitor = new ClipboardMonitor({
clipboardReader: {
- getText: yomitan.api.clipboardGet.bind(yomitan.api)
+ getText: this._display.application.api.clipboardGet.bind(this._display.application.api)
}
});
/** @type {import('application').ApiMap} */
@@ -89,7 +88,7 @@ export class SearchDisplayController {
this._searchPersistentStateController.on('modeChange', this._onModeChange.bind(this));
chrome.runtime.onMessage.addListener(this._onMessage.bind(this));
- yomitan.on('optionsUpdated', this._onOptionsUpdated.bind(this));
+ this._display.application.on('optionsUpdated', this._onOptionsUpdated.bind(this));
this._display.on('optionsUpdated', this._onDisplayOptionsUpdated.bind(this));
this._display.on('contentUpdateStart', this._onContentUpdateStart.bind(this));
@@ -297,7 +296,7 @@ export class SearchDisplayController {
scope: 'profile',
optionsContext: this._display.getOptionsContext()
};
- yomitan.api.modifySettings([modification], 'search');
+ this._display.application.api.modifySettings([modification], 'search');
}
/**
@@ -430,7 +429,7 @@ export class SearchDisplayController {
scope: 'profile',
optionsContext: this._display.getOptionsContext()
};
- await yomitan.api.modifySettings([modification], 'search');
+ await this._display.application.api.modifySettings([modification], 'search');
}
/** */