diff --git a/src/popup.ts b/src/popup.ts index 5fb87bcf..b5d83e6c 100644 --- a/src/popup.ts +++ b/src/popup.ts @@ -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 { const messageHandler = new MessageHandler(messageListener); @@ -45,7 +47,14 @@ async function runThePopup(messageListener?: MessageListener): Promise { 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",