diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2024-01-28 07:22:47 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-28 12:22:47 +0000 |
commit | acc013a1a8051d34322f0f5f91d7bdecc0a18843 (patch) | |
tree | 601344b2f047f395548ddfb16a83319af10464f9 /ext/js/comm/clipboard-monitor.js | |
parent | a51f1ab2dc675a49bfeeb08cc24b97eb8d888e4a (diff) |
JapaneseUtil refactor (#555)
* Copy functions from JapaneseUtil
* Remove JapaneseUtil
* Update usages of JapaneseUtil functions
Diffstat (limited to 'ext/js/comm/clipboard-monitor.js')
-rw-r--r-- | ext/js/comm/clipboard-monitor.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ext/js/comm/clipboard-monitor.js b/ext/js/comm/clipboard-monitor.js index a1ea3362..a8e79a1b 100644 --- a/ext/js/comm/clipboard-monitor.js +++ b/ext/js/comm/clipboard-monitor.js @@ -17,18 +17,17 @@ */ import {EventDispatcher} from '../core/event-dispatcher.js'; +import {isStringPartiallyJapanese} from '../language/japanese.js'; /** * @augments EventDispatcher<import('clipboard-monitor').Events> */ export class ClipboardMonitor extends EventDispatcher { /** - * @param {{japaneseUtil: import('../language/sandbox/japanese-util.js').JapaneseUtil, clipboardReader: import('clipboard-monitor').ClipboardReaderLike}} details + * @param {{clipboardReader: import('clipboard-monitor').ClipboardReaderLike}} details */ - constructor({japaneseUtil, clipboardReader}) { + constructor({clipboardReader}) { super(); - /** @type {import('../language/sandbox/japanese-util.js').JapaneseUtil} */ - this._japaneseUtil = japaneseUtil; /** @type {import('clipboard-monitor').ClipboardReaderLike} */ this._clipboardReader = clipboardReader; /** @type {?import('core').Timeout} */ @@ -72,7 +71,7 @@ export class ClipboardMonitor extends EventDispatcher { text !== this._previousText ) { this._previousText = text; - if (canChange && this._japaneseUtil.isStringPartiallyJapanese(text)) { + if (canChange && isStringPartiallyJapanese(text)) { this.trigger('change', {text}); } } |