mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-11 14:07:13 +03:00
Merge branch 'master' of https://github.com/ajayyy/SponsorBlock into chapters
This commit is contained in:
@@ -45,13 +45,13 @@ interface SBConfig {
|
||||
showDonationLink: boolean,
|
||||
autoHideInfoButton: boolean,
|
||||
autoSkipOnMusicVideos: boolean,
|
||||
highlightCategoryUpdate: boolean,
|
||||
colorPalette: {
|
||||
red: string,
|
||||
white: string,
|
||||
locked: string
|
||||
},
|
||||
scrollToEditTimeUpdate: boolean,
|
||||
fillerUpdate: boolean,
|
||||
|
||||
// What categories should be skipped
|
||||
categorySelections: CategorySelection[],
|
||||
@@ -75,6 +75,8 @@ interface SBConfig {
|
||||
"preview-music_offtopic": PreviewBarOption,
|
||||
"poi_highlight": PreviewBarOption,
|
||||
"preview-poi_highlight": PreviewBarOption,
|
||||
"filler": PreviewBarOption,
|
||||
"preview-filler": PreviewBarOption,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,12 +202,15 @@ const Config: SBObject = {
|
||||
showDonationLink: true,
|
||||
autoHideInfoButton: true,
|
||||
autoSkipOnMusicVideos: false,
|
||||
highlightCategoryUpdate: false, // TODO: Remove this once update is done
|
||||
scrollToEditTimeUpdate: false, // false means the tooltip will be shown
|
||||
fillerUpdate: false,
|
||||
|
||||
categorySelections: [{
|
||||
name: "sponsor" as Category,
|
||||
option: CategorySkipOption.AutoSkip
|
||||
}, {
|
||||
name: "poi_highlight" as Category,
|
||||
option: CategorySkipOption.ManualSkip
|
||||
}],
|
||||
|
||||
colorPalette: {
|
||||
@@ -283,6 +288,14 @@ const Config: SBObject = {
|
||||
"preview-poi_highlight": {
|
||||
color: "#9b044c",
|
||||
opacity: "0.7"
|
||||
},
|
||||
"filler": {
|
||||
color: "#7300FF",
|
||||
opacity: "0.9"
|
||||
},
|
||||
"preview-filler": {
|
||||
color: "#2E0066",
|
||||
opacity: "0.7"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -379,16 +392,11 @@ function fetchConfig(): Promise<void> {
|
||||
}
|
||||
|
||||
function migrateOldFormats(config: SBConfig) {
|
||||
// Should eventually move into defaults
|
||||
if (!config["highlightCategoryAdded"] && !config.categorySelections.some((s) => s.name === "poi_highlight")) {
|
||||
config["highlightCategoryAdded"] = true;
|
||||
|
||||
config.categorySelections.push({
|
||||
name: "poi_highlight" as Category,
|
||||
option: CategorySkipOption.ManualSkip
|
||||
});
|
||||
|
||||
config.categorySelections = config.categorySelections;
|
||||
if (config["highlightCategoryAdded"] !== undefined) {
|
||||
chrome.storage.sync.remove("highlightCategoryAdded");
|
||||
}
|
||||
if (config["highlightCategoryUpdate"] !== undefined) {
|
||||
chrome.storage.sync.remove("highlightCategoryUpdate");
|
||||
}
|
||||
|
||||
if (config["askAboutUnlistedVideos"]) {
|
||||
|
||||
Reference in New Issue
Block a user