mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-11 22:17:21 +03:00
Merge master
This commit is contained in:
13
src/popup.ts
13
src/popup.ts
@@ -38,6 +38,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);
|
||||
@@ -46,7 +48,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",
|
||||
@@ -376,7 +385,7 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
|
||||
const sponsorTimeButton = document.createElement("button");
|
||||
sponsorTimeButton.className = "segmentTimeButton popupElement";
|
||||
|
||||
const prefix = chrome.i18n.getMessage("category_" + segmentTimes[i].category) + ": ";
|
||||
const prefix = utils.shortCategoryName(segmentTimes[i].category) + ": ";
|
||||
|
||||
let extraInfo = "";
|
||||
if (segmentTimes[i].hidden === SponsorHideType.Downvoted) {
|
||||
|
||||
Reference in New Issue
Block a user