aboutsummaryrefslogtreecommitdiff
path: root/src/content/actions/operation.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/actions/operation.ts')
-rw-r--r--src/content/actions/operation.ts8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/content/actions/operation.ts b/src/content/actions/operation.ts
index 28192d7..657cf47 100644
--- a/src/content/actions/operation.ts
+++ b/src/content/actions/operation.ts
@@ -9,11 +9,13 @@ import AddonEnabledUseCase from '../usecases/AddonEnabledUseCase';
import ClipboardUseCase from '../usecases/ClipboardUseCase';
import { SettingRepositoryImpl } from '../repositories/SettingRepository';
import { ScrollPresenterImpl } from '../presenters/ScrollPresenter';
+import { FollowMasterClientImpl } from '../client/FollowMasterClient';
let addonEnabledUseCase = new AddonEnabledUseCase();
let clipbaordUseCase = new ClipboardUseCase();
let settingRepository = new SettingRepositoryImpl();
let scrollPresenter = new ScrollPresenterImpl();
+let followMasterClient = new FollowMasterClientImpl(window.top);
// eslint-disable-next-line complexity, max-lines-per-function
const exec = async(
@@ -63,11 +65,7 @@ const exec = async(
scrollPresenter.scrollToEnd(smoothscroll);
break;
case operations.FOLLOW_START:
- window.top.postMessage(JSON.stringify({
- type: messages.FOLLOW_START,
- newTab: operation.newTab,
- background: operation.background,
- }), '*');
+ followMasterClient.startFollow(operation.newTab, operation.background);
break;
case operations.MARK_SET_PREFIX:
return markActions.startSet();