mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-18 05:28:32 +03:00
Default UUIDs to an empty list instead of null.
Resolves https://github.com/ajayyy/SponsorBlock/issues/252.
This commit is contained in:
@@ -13,7 +13,7 @@ var sponsorDataFound = false;
|
|||||||
var previousVideoID = null;
|
var previousVideoID = null;
|
||||||
//the actual sponsorTimes if loaded and UUIDs associated with them
|
//the actual sponsorTimes if loaded and UUIDs associated with them
|
||||||
var sponsorTimes = null;
|
var sponsorTimes = null;
|
||||||
var UUIDs = null;
|
var UUIDs = [];
|
||||||
//what video id are these sponsors for
|
//what video id are these sponsors for
|
||||||
var sponsorVideoID = null;
|
var sponsorVideoID = null;
|
||||||
|
|
||||||
@@ -215,7 +215,7 @@ function resetValues() {
|
|||||||
|
|
||||||
//reset sponsor times
|
//reset sponsor times
|
||||||
sponsorTimes = null;
|
sponsorTimes = null;
|
||||||
UUIDs = null;
|
UUIDs = [];
|
||||||
sponsorLookupRetries = 0;
|
sponsorLookupRetries = 0;
|
||||||
|
|
||||||
//empty the preview bar
|
//empty the preview bar
|
||||||
@@ -627,7 +627,6 @@ function skipToTime(v, index, sponsorTimes, openNotice) {
|
|||||||
vote(1, currentUUID, null);
|
vote(1, currentUUID, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//send telemetry that a this sponsor was skipped
|
//send telemetry that a this sponsor was skipped
|
||||||
if (Config.config.trackViewCount && !sponsorSkipped[index]) {
|
if (Config.config.trackViewCount && !sponsorSkipped[index]) {
|
||||||
@@ -641,6 +640,7 @@ function skipToTime(v, index, sponsorTimes, openNotice) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function unskipSponsorTime(UUID) {
|
function unskipSponsorTime(UUID) {
|
||||||
if (sponsorTimes != null) {
|
if (sponsorTimes != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user