diff options
Diffstat (limited to 'src/content/repositories')
-rw-r--r-- | src/content/repositories/AddressRepository.ts | 2 | ||||
-rw-r--r-- | src/content/repositories/ClipboardRepository.ts | 22 | ||||
-rw-r--r-- | src/content/repositories/FollowMasterRepository.ts | 3 | ||||
-rw-r--r-- | src/content/repositories/FollowSlaveRepository.ts | 2 | ||||
-rw-r--r-- | src/content/repositories/KeymapRepository.ts | 5 | ||||
-rw-r--r-- | src/content/repositories/MarkKeyRepository.ts | 1 | ||||
-rw-r--r-- | src/content/repositories/MarkRepository.ts | 4 | ||||
-rw-r--r-- | src/content/repositories/SettingRepository.ts | 2 |
8 files changed, 18 insertions, 23 deletions
diff --git a/src/content/repositories/AddressRepository.ts b/src/content/repositories/AddressRepository.ts index 6f9487b..f200bf2 100644 --- a/src/content/repositories/AddressRepository.ts +++ b/src/content/repositories/AddressRepository.ts @@ -1,5 +1,5 @@ export default interface AddressRepository { - getCurrentURL(): URL + getCurrentURL(): URL; } export class AddressRepositoryImpl implements AddressRepository { diff --git a/src/content/repositories/ClipboardRepository.ts b/src/content/repositories/ClipboardRepository.ts index 8219835..a700543 100644 --- a/src/content/repositories/ClipboardRepository.ts +++ b/src/content/repositories/ClipboardRepository.ts @@ -6,39 +6,39 @@ export default interface ClipboardRepository { export class ClipboardRepositoryImpl { read(): string { - const textarea = window.document.createElement('textarea'); + const textarea = window.document.createElement("textarea"); window.document.body.append(textarea); - textarea.style.position = 'fixed'; - textarea.style.top = '-100px'; - textarea.contentEditable = 'true'; + textarea.style.position = "fixed"; + textarea.style.top = "-100px"; + textarea.contentEditable = "true"; textarea.focus(); - const ok = window.document.execCommand('paste'); + const ok = window.document.execCommand("paste"); const value = textarea.textContent!!; textarea.remove(); if (!ok) { - throw new Error('failed to access clipbaord'); + throw new Error("failed to access clipbaord"); } return value; } write(text: string): void { - const input = window.document.createElement('input'); + const input = window.document.createElement("input"); window.document.body.append(input); - input.style.position = 'fixed'; - input.style.top = '-100px'; + input.style.position = "fixed"; + input.style.top = "-100px"; input.value = text; input.select(); - const ok = window.document.execCommand('copy'); + const ok = window.document.execCommand("copy"); input.remove(); if (!ok) { - throw new Error('failed to access clipbaord'); + throw new Error("failed to access clipbaord"); } } } diff --git a/src/content/repositories/FollowMasterRepository.ts b/src/content/repositories/FollowMasterRepository.ts index da2402c..cc49e5f 100644 --- a/src/content/repositories/FollowMasterRepository.ts +++ b/src/content/repositories/FollowMasterRepository.ts @@ -35,7 +35,7 @@ export class FollowMasterRepositoryImpl implements FollowMasterRepository { } getTagsByPrefix(prefix: string): string[] { - return current.tags.filter(t => t.startsWith(prefix)); + return current.tags.filter((t) => t.startsWith(prefix)); } addTag(tag: string): void { @@ -54,4 +54,3 @@ export class FollowMasterRepositoryImpl implements FollowMasterRepository { return current.background; } } - diff --git a/src/content/repositories/FollowSlaveRepository.ts b/src/content/repositories/FollowSlaveRepository.ts index 42a0710..0dc9e89 100644 --- a/src/content/repositories/FollowSlaveRepository.ts +++ b/src/content/repositories/FollowSlaveRepository.ts @@ -25,5 +25,3 @@ export class FollowSlaveRepositoryImpl implements FollowSlaveRepository { return current.enabled; } } - - diff --git a/src/content/repositories/KeymapRepository.ts b/src/content/repositories/KeymapRepository.ts index 2944723..6a7d656 100644 --- a/src/content/repositories/KeymapRepository.ts +++ b/src/content/repositories/KeymapRepository.ts @@ -1,5 +1,5 @@ -import Key from '../../shared/settings/Key'; -import KeySequence from '../domains/KeySequence'; +import Key from "../../shared/settings/Key"; +import KeySequence from "../domains/KeySequence"; export default interface KeymapRepository { enqueueKey(key: Key): KeySequence; @@ -10,7 +10,6 @@ export default interface KeymapRepository { let current: KeySequence = new KeySequence([]); export class KeymapRepositoryImpl { - enqueueKey(key: Key): KeySequence { current.push(key); return current; diff --git a/src/content/repositories/MarkKeyRepository.ts b/src/content/repositories/MarkKeyRepository.ts index 18c3e23..c351c13 100644 --- a/src/content/repositories/MarkKeyRepository.ts +++ b/src/content/repositories/MarkKeyRepository.ts @@ -23,7 +23,6 @@ const current: Mode = { }; export class MarkKeyRepositoryImpl implements MarkKeyRepository { - isSetMode(): boolean { return current.setMode; } diff --git a/src/content/repositories/MarkRepository.ts b/src/content/repositories/MarkRepository.ts index afa980a..e48db25 100644 --- a/src/content/repositories/MarkRepository.ts +++ b/src/content/repositories/MarkRepository.ts @@ -1,4 +1,4 @@ -import Mark from '../domains/Mark'; +import Mark from "../domains/Mark"; export default interface MarkRepository { set(key: string, mark: Mark): void; @@ -6,7 +6,7 @@ export default interface MarkRepository { get(key: string): Mark | null; } -const saved: {[key: string]: Mark} = {}; +const saved: { [key: string]: Mark } = {}; export class MarkRepositoryImpl implements MarkRepository { set(key: string, mark: Mark): void { diff --git a/src/content/repositories/SettingRepository.ts b/src/content/repositories/SettingRepository.ts index 4ba26e0..1e393cd 100644 --- a/src/content/repositories/SettingRepository.ts +++ b/src/content/repositories/SettingRepository.ts @@ -1,4 +1,4 @@ -import Settings, { DefaultSetting } from '../../shared/settings/Settings'; +import Settings, { DefaultSetting } from "../../shared/settings/Settings"; let current: Settings = DefaultSetting; |