mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 04:27:15 +03:00
Added delete function to new dialog
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import Config from "./config";
|
||||
|
||||
import { ContentContainer } from "./types";
|
||||
import Utils from "./utils";
|
||||
var utils = new Utils();
|
||||
|
||||
|
||||
import runThePopup from "./popup";
|
||||
|
||||
import PreviewBar from "./js-components/previewBar";
|
||||
@@ -91,20 +93,22 @@ var popupInitialised = false;
|
||||
var submissionNotice: SubmissionNotice = null;
|
||||
|
||||
// Contains all of the functions and variables needed by the skip notice
|
||||
var skipNoticeContentContainer = () => ({
|
||||
var skipNoticeContentContainer: ContentContainer = () => ({
|
||||
vote,
|
||||
dontShowNoticeAgain,
|
||||
unskipSponsorTime,
|
||||
sponsorTimes,
|
||||
sponsorTimesSubmitting,
|
||||
hiddenSponsorTimes,
|
||||
UUIDs,
|
||||
v: video,
|
||||
sponsorVideoID,
|
||||
reskipSponsorTime,
|
||||
hiddenSponsorTimes,
|
||||
updatePreviewBar,
|
||||
onMobileYouTube,
|
||||
sponsorSubmissionNotice: submissionNotice,
|
||||
resetSponsorSubmissionNotice
|
||||
resetSponsorSubmissionNotice,
|
||||
changeStartSponsorButton
|
||||
});
|
||||
|
||||
//get messages from the background script and the popup
|
||||
@@ -1136,8 +1140,8 @@ function clearSponsorTimes() {
|
||||
}
|
||||
|
||||
//if skipNotice is null, it will not affect the UI
|
||||
function vote(type, UUID, skipNotice: SkipNoticeComponent) {
|
||||
if (skipNotice != null) {
|
||||
function vote(type, UUID, skipNotice?: SkipNoticeComponent) {
|
||||
if (skipNotice !== null && skipNotice !== undefined) {
|
||||
//add loading info
|
||||
skipNotice.addVoteButtonInfo.bind(skipNotice)("Loading...")
|
||||
skipNotice.setNoticeInfoMessage.bind(skipNotice)();
|
||||
|
||||
Reference in New Issue
Block a user