diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2024-02-20 10:13:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-20 15:13:57 +0000 |
commit | fe875bbd99980b175fc366a2bfd4395be9cbad72 (patch) | |
tree | 9eacc919cae0aa32c1a5e25b8493a0e86a21f16e /ext/js/display/search-display-controller.js | |
parent | 0e4ae922451af967c78616057ed26b85ba5d4b5c (diff) |
Constructor simplification (#713)
* Update AudioDownloader
* Update Translator
* Update ClipboardMonitor
* Update ClipboardReader
* Update PanelElement
* Update QueryParser
* Update DisplayGenerator
* Update DisplayHistory
* Update DOMDataBinder
* Remove unnecessary cast
* Update Popup types
* One declaration per line
* Remove optionals from Frontend constructor
* Fix Translator constructor
Diffstat (limited to 'ext/js/display/search-display-controller.js')
-rw-r--r-- | ext/js/display/search-display-controller.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/js/display/search-display-controller.js b/ext/js/display/search-display-controller.js index d8126027..e23d5d50 100644 --- a/ext/js/display/search-display-controller.js +++ b/ext/js/display/search-display-controller.js @@ -63,12 +63,12 @@ export class SearchDisplayController { this._introAnimationTimer = null; /** @type {boolean} */ this._clipboardMonitorEnabled = false; + /** @type {import('clipboard-monitor').ClipboardReaderLike} */ + const clipboardReader = { + getText: this._display.application.api.clipboardGet.bind(this._display.application.api) + }; /** @type {ClipboardMonitor} */ - this._clipboardMonitor = new ClipboardMonitor({ - clipboardReader: { - getText: this._display.application.api.clipboardGet.bind(this._display.application.api) - } - }); + this._clipboardMonitor = new ClipboardMonitor(clipboardReader); /** @type {import('application').ApiMap} */ this._apiMap = createApiMap([ ['searchDisplayControllerGetMode', this._onMessageGetMode.bind(this)], |