diff --git a/scripts/Actions/Audio.ts b/scripts/Actions/Audio.ts index fe3e1a3f..651763c3 100644 --- a/scripts/Actions/Audio.ts +++ b/scripts/Actions/Audio.ts @@ -6,12 +6,12 @@ export function playAudio(arn: AnimeNotifier, element: HTMLElement) { } // Pause audio -export function pauseAudio(arn: AnimeNotifier, button: HTMLButtonElement) { +export function pauseAudio(arn: AnimeNotifier) { arn.audioPlayer.pause() } // Resume audio -export function resumeAudio(arn: AnimeNotifier, button: HTMLButtonElement) { +export function resumeAudio(arn: AnimeNotifier) { arn.audioPlayer.resume() } diff --git a/scripts/Actions/Editor.ts b/scripts/Actions/Editor.ts index 36535cf2..bf26497d 100644 --- a/scripts/Actions/Editor.ts +++ b/scripts/Actions/Editor.ts @@ -55,7 +55,6 @@ export async function deleteKitsuAnime(arn: AnimeNotifier, button: HTMLButtonEle export async function multiSearchAnime(arn: AnimeNotifier, textarea: HTMLTextAreaElement) { let results = document.getElementById("multi-search-anime") as HTMLDivElement let animeTitles = textarea.value.split("\n") - let animeIDs = new Array(animeTitles.length) results.innerHTML = "" diff --git a/scripts/Actions/Explore.ts b/scripts/Actions/Explore.ts index dcf33936..a8fcdce4 100644 --- a/scripts/Actions/Explore.ts +++ b/scripts/Actions/Explore.ts @@ -26,7 +26,7 @@ export function filterAnime(arn: AnimeNotifier, input: HTMLInputElement) { } // Toggle hiding added anime. -export function toggleHideAddedAnime(arn: AnimeNotifier, input: HTMLButtonElement) { +export function toggleHideAddedAnime() { hideAddedAnime() } diff --git a/scripts/Actions/Install.ts b/scripts/Actions/Install.ts index ce462704..7699aa2d 100644 --- a/scripts/Actions/Install.ts +++ b/scripts/Actions/Install.ts @@ -1,16 +1,3 @@ -import AnimeNotifier from "../AnimeNotifier" - -// Chrome extension installation -export function installExtension(arn: AnimeNotifier, button: HTMLElement) { - let browser: any = window["chrome"] - - if(browser && browser.webstore) { - browser.webstore.install() - } else { - window.open("https://chrome.google.com/webstore/detail/anime-notifier/hajchfikckiofgilinkpifobdbiajfch", "_blank") - } -} - // Desktop app installation export function installApp() { alert("Open your browser menu > 'Install Anime Notifier'.") diff --git a/scripts/Actions/Theme.ts b/scripts/Actions/Theme.ts index 0b0468b1..4f1efac4 100644 --- a/scripts/Actions/Theme.ts +++ b/scripts/Actions/Theme.ts @@ -2,8 +2,8 @@ import AnimeNotifier from "../AnimeNotifier" let currentThemeName = "light" let previewTimeoutID: number = 0 -let themeWheel: HTMLElement -let themeWheelTimeoutID: number = 0 +// let themeWheel: HTMLElement +// let themeWheelTimeoutID: number = 0 const themes = { "light": {}, diff --git a/scripts/Actions/Upload.ts b/scripts/Actions/Upload.ts index a63868b0..b4d40489 100644 --- a/scripts/Actions/Upload.ts +++ b/scripts/Actions/Upload.ts @@ -1,5 +1,4 @@ import AnimeNotifier from "../AnimeNotifier" -import StatusMessage from "../StatusMessage" import { bytesHumanReadable, uploadWithProgress } from "../Utils" // Select file diff --git a/scripts/ServiceWorkerManager.ts b/scripts/ServiceWorkerManager.ts index 94c7f33c..454481bf 100644 --- a/scripts/ServiceWorkerManager.ts +++ b/scripts/ServiceWorkerManager.ts @@ -49,7 +49,7 @@ export default class ServiceWorkerManager { this.postMessage({ type: "loaded", - url: "" + url }) } diff --git a/tsconfig.json b/tsconfig.json index 25be1714..73e36d1d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,6 +5,8 @@ "moduleResolution": "node", "baseUrl": ".", "strict": false, - "strictFunctionTypes": false + "strictFunctionTypes": false, + "noUnusedLocals": true, + "noUnusedParameters": false } } \ No newline at end of file