diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-12-22 10:47:00 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-22 10:47:00 +0900 |
commit | b2dcdedad729ff7087867da50e20578f9fc8fb29 (patch) | |
tree | 033ecffbd7db9b6db8000464a68d748fcae1dc3d /src/content/client | |
parent | 3c7230c3036e8bb2b2e9a752be9b0ef4a0a7349d (diff) | |
parent | 75f86907fc2699c0f0661d4780c38249a18f849b (diff) |
Merge pull request #689 from ueokande/n-times-repeat-operations
Repeat commands n-times
Diffstat (limited to 'src/content/client')
-rw-r--r-- | src/content/client/OperationClient.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/content/client/OperationClient.ts b/src/content/client/OperationClient.ts index 5dbe555..9c72c75 100644 --- a/src/content/client/OperationClient.ts +++ b/src/content/client/OperationClient.ts @@ -2,7 +2,7 @@ import * as operations from '../../shared/operations'; import * as messages from '../../shared/messages'; export default interface OperationClient { - execBackgroundOp(op: operations.Operation): Promise<void>; + execBackgroundOp(repeat: number, op: operations.Operation): Promise<void>; internalOpenUrl( url: string, newTab?: boolean, background?: boolean, @@ -10,9 +10,10 @@ export default interface OperationClient { } export class OperationClientImpl implements OperationClient { - execBackgroundOp(op: operations.Operation): Promise<void> { + execBackgroundOp(repeat: number, op: operations.Operation): Promise<void> { return browser.runtime.sendMessage({ type: messages.BACKGROUND_OPERATION, + repeat, operation: op, }); } @@ -22,6 +23,7 @@ export class OperationClientImpl implements OperationClient { ): Promise<void> { return browser.runtime.sendMessage({ type: messages.BACKGROUND_OPERATION, + repeat: 1, operation: { type: operations.INTERNAL_OPEN_URL, url, |