diff options
-rw-r--r-- | config.json.example | 2 | ||||
-rw-r--r-- | public/_locales/en/messages.json | 4 | ||||
-rw-r--r-- | public/content.css | 2 | ||||
-rw-r--r-- | src/config.ts | 12 | ||||
-rw-r--r-- | src/utils.ts | 9 |
5 files changed, 14 insertions, 15 deletions
diff --git a/config.json.example b/config.json.example index fae36834..f170050e 100644 --- a/config.json.example +++ b/config.json.example @@ -2,5 +2,5 @@ "serverAddress": "https://sponsor.ajay.app", "testingServerAddress": "https://sponsor.ajay.app/test", "serverAddressComment": "This specifies the default SponsorBlock server to connect to", - "categoryList": ["sponsor", "selfpromo", "interaction", "intro", "outro", "preview", "music_offtopic", "highlight"] + "categoryList": ["sponsor", "selfpromo", "interaction", "intro", "outro", "preview", "music_offtopic", "poi_highlight"] } diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json index 1fc75527..1609ab07 100644 --- a/public/_locales/en/messages.json +++ b/public/_locales/en/messages.json @@ -550,10 +550,10 @@ "category_music_offtopic_short": { "message": "Non-Music" }, - "category_highlight": { + "category_poi_highlight": { "message": "Highlight" }, - "category_highlight_description": { + "category_poi_highlight_description": { "message": "The part of the video that most people are looking for. Similar to \"Video starts at x\" comments." }, "category_livestream_messages": { diff --git a/public/content.css b/public/content.css index 47049e7c..ed1e2a5f 100644 --- a/public/content.css +++ b/public/content.css @@ -169,7 +169,7 @@ } .sponsorSkipNoticeFaded { - opacity: 0.3; + opacity: 0.5; } .sponsorSkipNoticeFadeOut { diff --git a/src/config.ts b/src/config.ts index 5e25f774..f71b3b9f 100644 --- a/src/config.ts +++ b/src/config.ts @@ -60,8 +60,8 @@ interface SBConfig { "preview-preview": PreviewBarOption, "music_offtopic": PreviewBarOption, "preview-music_offtopic": PreviewBarOption, - "highlight": PreviewBarOption, - "preview-highlight": PreviewBarOption, + "poi_highlight": PreviewBarOption, + "preview-poi_highlight": PreviewBarOption, } } @@ -249,11 +249,11 @@ const Config: SBObject = { color: "#a6634a", opacity: "0.7" }, - "highlight": { + "poi_highlight": { color: "#ff1684", opacity: "0.7" }, - "preview-highlight": { + "preview-poi_highlight": { color: "#9b044c", opacity: "0.7" } @@ -352,11 +352,11 @@ function fetchConfig(): Promise<void> { } function migrateOldFormats(config: SBConfig) { - if (!config["highlightCategoryAdded"] && !config.categorySelections.some((s) => s.name === "highlight")) { + if (!config["highlightCategoryAdded"] && !config.categorySelections.some((s) => s.name === "poi_highlight")) { config["highlightCategoryAdded"] = true; config.categorySelections.push({ - name: "highlight" as Category, + name: "poi_highlight" as Category, option: CategorySkipOption.ManualSkip }); diff --git a/src/utils.ts b/src/utils.ts index 29a8ef38..b2c75cd8 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -44,11 +44,10 @@ export default class Utils { } getCategoryActionType(category: Category): CategoryActionType { - switch (category) { - case "highlight": - return CategoryActionType.POI; - default: - return CategoryActionType.Skippable; + if (category.startsWith("poi_")) { + return CategoryActionType.POI; + } else { + return CategoryActionType.Skippable; } } |