mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-24 08:28:31 +03:00
Removed deprecated code to fix whitelist array.
This commit is contained in:
17
content.js
17
content.js
@@ -525,23 +525,6 @@ function whitelistCheck() {
|
|||||||
UUIDs = [];
|
UUIDs = [];
|
||||||
|
|
||||||
channelWhitelisted = true;
|
channelWhitelisted = true;
|
||||||
|
|
||||||
//make sure the whitelistedChannels array isn't broken and full of null entries
|
|
||||||
//TODO: remove this at some point in the future as the bug that caused this should be patched
|
|
||||||
if (whitelistedChannels.some((el) => el === null)) {
|
|
||||||
//remove the entries that are null
|
|
||||||
let cleanWhitelistedChannelsArray = [];
|
|
||||||
for (let i = 0; i < whitelistedChannels.length; i++) {
|
|
||||||
let channelURL = whitelistedChannels[i];
|
|
||||||
if (channelURL !== null) {
|
|
||||||
//add it
|
|
||||||
cleanWhitelistedChannelsArray.push(channelURL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//save this value
|
|
||||||
chrome.storage.sync.set({"whitelistedChannels": cleanWhitelistedChannelsArray});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user