aboutsummaryrefslogtreecommitdiff
path: root/src/content
diff options
context:
space:
mode:
Diffstat (limited to 'src/content')
-rw-r--r--src/content/presenters/FindPresenter.ts20
-rw-r--r--src/content/repositories/ClipboardRepository.ts2
-rw-r--r--src/content/usecases/FollowMasterUseCase.ts4
3 files changed, 3 insertions, 23 deletions
diff --git a/src/content/presenters/FindPresenter.ts b/src/content/presenters/FindPresenter.ts
index 117142c..b25190c 100644
--- a/src/content/presenters/FindPresenter.ts
+++ b/src/content/presenters/FindPresenter.ts
@@ -4,26 +4,6 @@ export default interface FindPresenter {
clearSelection(): void;
}
-// window.find(aString, aCaseSensitive, aBackwards, aWrapAround,
-// aWholeWord, aSearchInFrames);
-//
-// NOTE: window.find is not standard API
-// https://developer.mozilla.org/en-US/docs/Web/API/Window/find
-interface MyWindow extends Window {
- find(
- aString: string,
- aCaseSensitive?: boolean,
- aBackwards?: boolean,
- aWrapAround?: boolean,
- aWholeWord?: boolean,
- aSearchInFrames?: boolean,
- aShowDialog?: boolean
- ): boolean;
-}
-
-// eslint-disable-next-line no-var, vars-on-top, init-declarations
-declare var window: MyWindow;
-
export class FindPresenterImpl implements FindPresenter {
find(keyword: string, backwards: boolean): boolean {
const caseSensitive = false;
diff --git a/src/content/repositories/ClipboardRepository.ts b/src/content/repositories/ClipboardRepository.ts
index a700543..20e7367 100644
--- a/src/content/repositories/ClipboardRepository.ts
+++ b/src/content/repositories/ClipboardRepository.ts
@@ -15,7 +15,7 @@ export class ClipboardRepositoryImpl {
textarea.focus();
const ok = window.document.execCommand("paste");
- const value = textarea.textContent!!;
+ const value = textarea.textContent!;
textarea.remove();
if (!ok) {
diff --git a/src/content/usecases/FollowMasterUseCase.ts b/src/content/usecases/FollowMasterUseCase.ts
index 329f05a..88c682e 100644
--- a/src/content/usecases/FollowMasterUseCase.ts
+++ b/src/content/usecases/FollowMasterUseCase.ts
@@ -47,7 +47,7 @@ export default class FollowMasterUseCase {
for (let i = 0; i < frameElements.length; ++i) {
const ele = frameElements[i] as HTMLFrameElement | HTMLIFrameElement;
const { left: frameX, top: frameY } = ele.getBoundingClientRect();
- const client = this.followSlaveClientFactory.create(ele.contentWindow!!);
+ const client = this.followSlaveClientFactory.create(ele.contentWindow!);
client.requestHintCount(
{ width: viewWidth, height: viewHeight },
{ x: frameX, y: frameY }
@@ -59,7 +59,7 @@ export default class FollowMasterUseCase {
createSlaveHints(count: number, sender: Window): void {
const produced = [];
for (let i = 0; i < count; ++i) {
- const tag = this.producer!!.produce();
+ const tag = this.producer!.produce();
produced.push(tag);
this.followMasterRepository.addTag(tag);
}