diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-25 21:55:45 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-25 22:16:49 +0900 |
commit | 48e005dc825a5211b4d3e92ed06ad15e01c23d13 (patch) | |
tree | 255ffc7841f33292a00f5bf0e11e4c4c854fe975 /src/content/usecases/ClipboardUseCase.ts | |
parent | a2ee6897bfbb95a0cca50ab11042aaf94c5de77c (diff) |
Repeat open, tabopen and winopen command
Diffstat (limited to 'src/content/usecases/ClipboardUseCase.ts')
-rw-r--r-- | src/content/usecases/ClipboardUseCase.ts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/content/usecases/ClipboardUseCase.ts b/src/content/usecases/ClipboardUseCase.ts index 8c4d621..c8fe719 100644 --- a/src/content/usecases/ClipboardUseCase.ts +++ b/src/content/usecases/ClipboardUseCase.ts @@ -2,16 +2,16 @@ import { injectable, inject } from 'tsyringe'; import * as urls from '../../shared/urls'; import ClipboardRepository from '../repositories/ClipboardRepository'; import SettingRepository from '../repositories/SettingRepository'; -import TabsClient from '../client/TabsClient'; import ConsoleClient from '../client/ConsoleClient'; +import OperationClient from '../client/OperationClient'; @injectable() export default class ClipboardUseCase { constructor( @inject('ClipboardRepository') private repository: ClipboardRepository, @inject('SettingRepository') private settingRepository: SettingRepository, - @inject('TabsClient') private client: TabsClient, @inject('ConsoleClient') private consoleClient: ConsoleClient, + @inject('OperationClient') private operationClinet: OperationClient, ) { } @@ -26,6 +26,10 @@ export default class ClipboardUseCase { let search = this.settingRepository.get().search; let text = this.repository.read(); let url = urls.searchUrl(text, search); - await this.client.openUrl(url, newTab); + + // TODO: Repeat pasting from clipboard instead of opening a certain url. + // 'Repeat last' command is implemented in the background script and cannot + // access to clipboard until Firefox 63. + await this.operationClinet.internalOpenUrl(url, newTab); } } |