From ab58c5edb79b4a5aa347e80deaeb612216a9d34e Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sat, 21 Dec 2019 15:08:07 +0900 Subject: Add numeric prefix to repeat a command --- src/content/client/OperationClient.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/content/client') diff --git a/src/content/client/OperationClient.ts b/src/content/client/OperationClient.ts index 5dbe555..06077dc 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; + execBackgroundOp(count: number, op: operations.Operation): Promise; 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 { + execBackgroundOp(count: number, op: operations.Operation): Promise { return browser.runtime.sendMessage({ type: messages.BACKGROUND_OPERATION, + count, operation: op, }); } @@ -22,6 +23,7 @@ export class OperationClientImpl implements OperationClient { ): Promise { return browser.runtime.sendMessage({ type: messages.BACKGROUND_OPERATION, + count: 1, operation: { type: operations.INTERNAL_OPEN_URL, url, -- cgit v1.2.3