mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 12:37:05 +03:00
Rename highlight category to poi_highlight
This commit is contained in:
@@ -2,5 +2,5 @@
|
|||||||
"serverAddress": "https://sponsor.ajay.app",
|
"serverAddress": "https://sponsor.ajay.app",
|
||||||
"testingServerAddress": "https://sponsor.ajay.app/test",
|
"testingServerAddress": "https://sponsor.ajay.app/test",
|
||||||
"serverAddressComment": "This specifies the default SponsorBlock server to connect to",
|
"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"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -550,10 +550,10 @@
|
|||||||
"category_music_offtopic_short": {
|
"category_music_offtopic_short": {
|
||||||
"message": "Non-Music"
|
"message": "Non-Music"
|
||||||
},
|
},
|
||||||
"category_highlight": {
|
"category_poi_highlight": {
|
||||||
"message": "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."
|
"message": "The part of the video that most people are looking for. Similar to \"Video starts at x\" comments."
|
||||||
},
|
},
|
||||||
"category_livestream_messages": {
|
"category_livestream_messages": {
|
||||||
|
|||||||
@@ -169,7 +169,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.sponsorSkipNoticeFaded {
|
.sponsorSkipNoticeFaded {
|
||||||
opacity: 0.3;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sponsorSkipNoticeFadeOut {
|
.sponsorSkipNoticeFadeOut {
|
||||||
|
|||||||
@@ -60,8 +60,8 @@ interface SBConfig {
|
|||||||
"preview-preview": PreviewBarOption,
|
"preview-preview": PreviewBarOption,
|
||||||
"music_offtopic": PreviewBarOption,
|
"music_offtopic": PreviewBarOption,
|
||||||
"preview-music_offtopic": PreviewBarOption,
|
"preview-music_offtopic": PreviewBarOption,
|
||||||
"highlight": PreviewBarOption,
|
"poi_highlight": PreviewBarOption,
|
||||||
"preview-highlight": PreviewBarOption,
|
"preview-poi_highlight": PreviewBarOption,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -249,11 +249,11 @@ const Config: SBObject = {
|
|||||||
color: "#a6634a",
|
color: "#a6634a",
|
||||||
opacity: "0.7"
|
opacity: "0.7"
|
||||||
},
|
},
|
||||||
"highlight": {
|
"poi_highlight": {
|
||||||
color: "#ff1684",
|
color: "#ff1684",
|
||||||
opacity: "0.7"
|
opacity: "0.7"
|
||||||
},
|
},
|
||||||
"preview-highlight": {
|
"preview-poi_highlight": {
|
||||||
color: "#9b044c",
|
color: "#9b044c",
|
||||||
opacity: "0.7"
|
opacity: "0.7"
|
||||||
}
|
}
|
||||||
@@ -352,11 +352,11 @@ function fetchConfig(): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function migrateOldFormats(config: SBConfig) {
|
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["highlightCategoryAdded"] = true;
|
||||||
|
|
||||||
config.categorySelections.push({
|
config.categorySelections.push({
|
||||||
name: "highlight" as Category,
|
name: "poi_highlight" as Category,
|
||||||
option: CategorySkipOption.ManualSkip
|
option: CategorySkipOption.ManualSkip
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -44,11 +44,10 @@ export default class Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getCategoryActionType(category: Category): CategoryActionType {
|
getCategoryActionType(category: Category): CategoryActionType {
|
||||||
switch (category) {
|
if (category.startsWith("poi_")) {
|
||||||
case "highlight":
|
return CategoryActionType.POI;
|
||||||
return CategoryActionType.POI;
|
} else {
|
||||||
default:
|
return CategoryActionType.Skippable;
|
||||||
return CategoryActionType.Skippable;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user