Restart Voting button. Wiki links. SkipNotice Improvements

This commit is contained in:
FlorianZahn
2021-10-06 23:02:26 +02:00
parent 93f02877a7
commit 4afc2c153a
3 changed files with 154 additions and 53 deletions

View File

@@ -43,7 +43,8 @@ interface SBConfig {
showDonationLink: boolean,
autoHideInfoButton: boolean,
autoSkipOnMusicVideos: boolean,
highlightCategoryUpdate: boolean
highlightCategoryUpdate: boolean,
wikiPages: SBMap<string, string>
// What categories should be skipped
categorySelections: CategorySelection[],
@@ -120,14 +121,6 @@ class SBMap<T, U> extends Map {
this.update();
return result;
}
addArray(key: T, value: U) {
// Expand an array by value
let result = super.get(key).concat(value);
this.set(key, result);
this.update();
return result;
}
delete(key) {
const result = super.delete(key);
@@ -205,6 +198,19 @@ const Config: SBObject = {
option: CategorySkipOption.AutoSkip
}],
wikiPages: new SBMap("wikiLinks", [
["sponsor", "https://wiki.sponsor.ajay.app/w/Sponsor"],
["selfpromo", "https://wiki.sponsor.ajay.app/w/Unpaid/Self_Promotion"],
["interaction", "https://wiki.sponsor.ajay.app/w/Interaction_Reminder_(Subscribe)"],
["intro", "https://wiki.sponsor.ajay.app/w/Intermission/Intro_Animation"],
["outro", "https://wiki.sponsor.ajay.app/w/Endcards/Credits"],
["preview", "https://wiki.sponsor.ajay.app/w/Preview/Recap"],
["music_offtopic", "https://wiki.sponsor.ajay.app/w/Music:_Non-Music_Section"],
["highlight_poi", "https://wiki.sponsor.ajay.app/w/Highlight"],
["guidelines", "https://wiki.sponsor.ajay.app/w/Guidelines"],
["mute", "https://wiki.sponsor.ajay.app/w/Mute_Segment"],
]),
// Preview bar
barTypes: {
"preview-chooseACategory": {