Fixed chapter skip notices not working + fixed typo

Fixed chapter skip notices not working + fixed typo

Fixed chapter skip notices not working + fixed typo

Fixed chapter skip notices not working + fixed typo

A skip notice is now shown upon voting if one isn't already on screen

minor fixes

fixed commit error
This commit is contained in:
gosha305
2025-03-04 02:42:59 +01:00
parent 66876283b4
commit 5a7e16b51c
6 changed files with 50 additions and 37 deletions

View File

@@ -44,6 +44,14 @@ export function getUpcomingText(segments: SponsorTime[]): string {
return chrome.i18n.getMessage(messageId).replace("{0}", categoryName);
}
export function getVoteText(segments: SponsorTime[]): string {
const categoryName = chrome.i18n.getMessage(segments.length > 1 ? "multipleSegments"
: "category_" + segments[0].category + "_short") || chrome.i18n.getMessage("category_" + segments[0].category);
const messageId = "voted_on";
return chrome.i18n.getMessage(messageId).replace("{0}", categoryName);
}
export function getCategorySuffix(category: Category): string {
if (category.startsWith("poi_")) {