Skip to content

Commit 4bfd7dc

Browse files
committed
Re-add Exclusive Access category
1 parent 5edfc3f commit 4bfd7dc

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

config.json.example

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
"serverAddress": "https://sponsor.ajay.app",
33
"testingServerAddress": "https://sponsor.ajay.app/test",
44
"serverAddressComment": "This specifies the default SponsorBlock server to connect to",
5-
"categoryList": ["sponsor", "selfpromo", "interaction", "poi_highlight", "intro", "outro", "preview", "hook", "filler"],
5+
"categoryList": ["sponsor", "selfpromo", "exclusive_access", "interaction", "poi_highlight", "intro", "outro", "preview", "hook", "filler"],
66
"categorySupport": {
77
"sponsor": ["skip", "full"],
88
"selfpromo": ["skip", "full"],
9+
"exclusive_access": ["full"],
910
"interaction": ["skip"],
1011
"intro": ["skip"],
1112
"outro": ["skip"],
@@ -17,6 +18,7 @@
1718
"wikiLinks": {
1819
"sponsor": "https://wiki.sponsor.ajay.app/w/Spot_SponsorBlock:Sponsor",
1920
"selfpromo": "https://wiki.sponsor.ajay.app/w/Spot_SponsorBlock:Unpaid/Self_Promotion",
21+
"exclusive_access": "https://wiki.sponsor.ajay.app/w/Spot_SponsorBlock:Full_Episode_Labels#Exclusive_Access",
2022
"interaction": "https://wiki.sponsor.ajay.app/w/Spot_SponsorBlock:Interaction_Reminder",
2123
"intro": "https://wiki.sponsor.ajay.app/w/Spot_SponsorBlock:Intermission/Intro",
2224
"outro": "https://wiki.sponsor.ajay.app/w/Spot_SponsorBlock:Credits/Outro",

src/config.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ interface SBConfig {
9898
"preview-sponsor": PreviewBarOption;
9999
"selfpromo": PreviewBarOption;
100100
"preview-selfpromo": PreviewBarOption;
101+
"exclusive_access": PreviewBarOption;
101102
"interaction": PreviewBarOption;
102103
"preview-interaction": PreviewBarOption;
103104
"intro": PreviewBarOption;
@@ -205,7 +206,7 @@ function migrateOldSyncFormats(config: SBConfig, local: SBStorage) {
205206
local.skipProfiles[skipProfileID] = {
206207
name: chrome.i18n.getMessage("WhitelistedChannels"),
207208
categorySelections: config.categorySelections
208-
.filter((s) => ![].includes(s.name))
209+
.filter((s) => !["exclusive_access"].includes(s.name))
209210
.map(s => ({
210211
name: s.name,
211212
option: CategorySkipOption.ShowOverlay
@@ -249,6 +250,10 @@ function migrateOldSyncFormats(config: SBConfig, local: SBStorage) {
249250
}
250251
}
251252

253+
if (config["exclusive_accessCategoryAdded"] !== undefined) {
254+
chrome.storage.sync.remove("exclusive_accessCategoryAdded");
255+
}
256+
252257
if (config["fillerUpdate"] !== undefined) {
253258
chrome.storage.sync.remove("fillerUpdate");
254259
}
@@ -397,6 +402,9 @@ const syncDefaults = {
397402
}, {
398403
name: "poi_highlight" as Category,
399404
option: CategorySkipOption.ManualSkip
405+
}, {
406+
name: "exclusive_access" as Category,
407+
option: CategorySkipOption.ShowOverlay
400408
}],
401409

402410
colorPalette: {
@@ -427,6 +435,10 @@ const syncDefaults = {
427435
color: "#bfbf35",
428436
opacity: "0.7"
429437
},
438+
"exclusive_access": {
439+
color: "#008a5c",
440+
opacity: "0.7"
441+
},
430442
"interaction": {
431443
color: "#cc00ff",
432444
opacity: "0.7"

src/utils/constants.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ export function getGuidelineInfo(category: Category): TextBox[] {
3434
icon: "icons/right-arrow.svg",
3535
text: chrome.i18n.getMessage(`generic_guideline2`)
3636
}];
37+
case "exclusive_access":
38+
return [{
39+
icon: "icons/money.svg",
40+
text: chrome.i18n.getMessage(`category_${category}_guideline1`)
41+
}];
3742
case "interaction":
3843
return [{
3944
icon: "icons/lightbulb.svg",

0 commit comments

Comments
 (0)