diff options
author | Ajay Ramachandran <[email protected]> | 2020-05-11 18:28:27 -0400 |
---|---|---|
committer | Ajay Ramachandran <[email protected]> | 2020-05-11 18:28:27 -0400 |
commit | b1d9cde715727de5aa037f022785106edb6c1473 (patch) | |
tree | 148434bf1bb481e495d82b6777abb5ccf1312ae7 | |
parent | aa8225c1961e2518cf5a618762daf7554d6d287d (diff) | |
download | SponsorBlock-b1d9cde715727de5aa037f022785106edb6c1473.tar.gz SponsorBlock-b1d9cde715727de5aa037f022785106edb6c1473.zip |
Added code to remove off-topic from category selections.
That category has been removed.
-rw-r--r-- | src/config.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/config.ts b/src/config.ts index c6d285f2..5b7b9929 100644 --- a/src/config.ts +++ b/src/config.ts @@ -281,6 +281,16 @@ async function migrateOldFormats() { Config.config.whitelistedChannels = newChannelList; } + + // Check if off-topic category needs to be removed + for (let i = 0; i < Config.config.categorySelections.length; i++) { + if (Config.config.categorySelections[i].name === "offtopic") { + Config.config.categorySelections.splice(i); + // Call set listener + Config.config.categorySelections = Config.config.categorySelections; + break; + } + } } async function setupConfig() { |