From b2f9754a19b70595d4c9567b16cc9defba792dde Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Thu, 11 Oct 2018 12:09:12 +0900 Subject: [PATCH] Fixed contenteditable save --- scripts/Actions/Install.ts | 2 +- scripts/AnimeNotifier.ts | 3 +-- scripts/Utils/requestIdleCallback.ts | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/Actions/Install.ts b/scripts/Actions/Install.ts index 32acdcda..ce462704 100644 --- a/scripts/Actions/Install.ts +++ b/scripts/Actions/Install.ts @@ -13,5 +13,5 @@ export function installExtension(arn: AnimeNotifier, button: HTMLElement) { // Desktop app installation export function installApp() { - alert("Open your browser menu > 'More tools' > 'Add to desktop' and enable 'Open as window'.") + alert("Open your browser menu > 'Install Anime Notifier'.") } \ No newline at end of file diff --git a/scripts/AnimeNotifier.ts b/scripts/AnimeNotifier.ts index 85fe0305..c661dc89 100644 --- a/scripts/AnimeNotifier.ts +++ b/scripts/AnimeNotifier.ts @@ -1019,8 +1019,7 @@ export default class AnimeNotifier { // Disallow Enter key in contenteditables and make it blur the element instead if(e.keyCode === 13) { if("blur" in activeElement) { - let blur = activeElement["blur"] as Function - blur() + (activeElement["blur"] as Function)() } return preventDefault() diff --git a/scripts/Utils/requestIdleCallback.ts b/scripts/Utils/requestIdleCallback.ts index 0ecbe5f5..5b7ede59 100644 --- a/scripts/Utils/requestIdleCallback.ts +++ b/scripts/Utils/requestIdleCallback.ts @@ -1,7 +1,6 @@ export function requestIdleCallback(func: Function) { if("requestIdleCallback" in window) { - let requestIdleCallback = window["requestIdleCallback"] as Function - requestIdleCallback(func) + (window["requestIdleCallback"] as Function)(func) } else { func() }