Merge pull request #578 from FoseFx/fosefx-eslint-fix

Fix eslint warnings
This commit is contained in:
Ajay Ramachandran
2020-12-17 13:20:48 -05:00
committed by GitHub
15 changed files with 165 additions and 74 deletions

View File

@@ -5,7 +5,7 @@ import { SponsorTime, SponsorHideType } from "./types";
const utils = new Utils();
interface MessageListener {
(request: any, sender: any, callback: (response: any) => void): void;
(request: any, sender: unknown, callback: (response: any) => void): void;
}
class MessageHandler {
@@ -37,6 +37,8 @@ class MessageHandler {
}
}
//make this a function to allow this to run on the content page
async function runThePopup(messageListener?: MessageListener): Promise<void> {
const messageHandler = new MessageHandler(messageListener);
@@ -45,7 +47,14 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
await utils.wait(() => Config.config !== null);
const PageElements: any = {};
type InputPageElements = {
whitelistToggle?: HTMLInputElement,
toggleSwitch?: HTMLInputElement,
usernameInput?: HTMLInputElement,
};
type PageElements = { [key: string]: HTMLElement } & InputPageElements
const PageElements: PageElements = {};
[
"sponsorblockPopup",