Made the skip notice work with TypeScript.

This commit is contained in:
Ajay Ramachandran
2020-02-01 18:17:48 -05:00
parent 20a09d3d27
commit 4bd410f04e
2 changed files with 30 additions and 13 deletions

View File

@@ -73,6 +73,19 @@ var sponsorTimesSubmitting = [];
//this is used to close the popup on YouTube when the other popup opens
var popupInitialised = false;
// Contains all of the functions and variables needed by the skip notice
var skipNoticeContentContainer = {
vote,
dontShowNoticeAgain,
unskipSponsorTime,
sponsorTimes,
UUIDs,
v,
reskipSponsorTime,
hiddenSponsorTimes,
updatePreviewBar
};
//get messages from the background script and the popup
chrome.runtime.onMessage.addListener(messageListener);
@@ -564,7 +577,7 @@ function skipToTime(v, index, sponsorTimes, openNotice) {
if (openNotice) {
//send out the message saying that a sponsor message was skipped
if (!SB.config.dontShowNotice) {
let skipNotice = new SkipNotice(this, currentUUID, SB.config.disableAutoSkip);
let skipNotice = new SkipNotice(this, currentUUID, SB.config.disableAutoSkip, skipNoticeContentContainer);
//TODO: Remove this when Invidious support is old
if (SB.config.invidiousUpdateInfoShowCount < 5) {