aboutsummaryrefslogtreecommitdiff
path: root/src/content/repositories
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/repositories')
-rw-r--r--src/content/repositories/AddonEnabledRepository.ts2
-rw-r--r--src/content/repositories/ClipboardRepository.ts10
-rw-r--r--src/content/repositories/MarkKeyRepository.ts2
-rw-r--r--src/content/repositories/MarkRepository.ts2
4 files changed, 8 insertions, 8 deletions
diff --git a/src/content/repositories/AddonEnabledRepository.ts b/src/content/repositories/AddonEnabledRepository.ts
index 7921bdb..ce3f521 100644
--- a/src/content/repositories/AddonEnabledRepository.ts
+++ b/src/content/repositories/AddonEnabledRepository.ts
@@ -1,4 +1,4 @@
-let enabled: boolean = false;
+let enabled = false;
export default interface AddonEnabledRepository {
set(on: boolean): void;
diff --git a/src/content/repositories/ClipboardRepository.ts b/src/content/repositories/ClipboardRepository.ts
index a046851..8219835 100644
--- a/src/content/repositories/ClipboardRepository.ts
+++ b/src/content/repositories/ClipboardRepository.ts
@@ -6,7 +6,7 @@ export default interface ClipboardRepository {
export class ClipboardRepositoryImpl {
read(): string {
- let textarea = window.document.createElement('textarea');
+ const textarea = window.document.createElement('textarea');
window.document.body.append(textarea);
textarea.style.position = 'fixed';
@@ -14,8 +14,8 @@ export class ClipboardRepositoryImpl {
textarea.contentEditable = 'true';
textarea.focus();
- let ok = window.document.execCommand('paste');
- let value = textarea.textContent!!;
+ const ok = window.document.execCommand('paste');
+ const value = textarea.textContent!!;
textarea.remove();
if (!ok) {
@@ -26,7 +26,7 @@ export class ClipboardRepositoryImpl {
}
write(text: string): void {
- let input = window.document.createElement('input');
+ const input = window.document.createElement('input');
window.document.body.append(input);
input.style.position = 'fixed';
@@ -34,7 +34,7 @@ export class ClipboardRepositoryImpl {
input.value = text;
input.select();
- let ok = window.document.execCommand('copy');
+ const ok = window.document.execCommand('copy');
input.remove();
if (!ok) {
diff --git a/src/content/repositories/MarkKeyRepository.ts b/src/content/repositories/MarkKeyRepository.ts
index 0b24af2..18c3e23 100644
--- a/src/content/repositories/MarkKeyRepository.ts
+++ b/src/content/repositories/MarkKeyRepository.ts
@@ -17,7 +17,7 @@ interface Mode {
jumpMode: boolean;
}
-let current: Mode = {
+const current: Mode = {
setMode: false,
jumpMode: false,
};
diff --git a/src/content/repositories/MarkRepository.ts b/src/content/repositories/MarkRepository.ts
index 678abc4..afa980a 100644
--- a/src/content/repositories/MarkRepository.ts
+++ b/src/content/repositories/MarkRepository.ts
@@ -14,7 +14,7 @@ export class MarkRepositoryImpl implements MarkRepository {
}
get(key: string): Mark | null {
- let v = saved[key];
+ const v = saved[key];
if (!v) {
return null;
}