Made view count tracking work when the notice is disabled

This commit is contained in:
Ajay Ramachandran
2019-08-15 11:12:46 -04:00
parent 1697bf5e6a
commit 73b8d82b0f

View File

@@ -513,13 +513,15 @@ function skipToTime(v, index, sponsorTimes, openNotice) {
setTimeout(() => closeSkipNotice(currentUUID), 7000);
//auto-upvote this sponsor
if (trackViewCount) {
vote(1, currentUUID, true);
}
}
//send telemetry that a this sponsor was skipped happened
if (trackViewCount) {
sendRequestToServer("GET", "/api/viewedVideoSponsorTime?UUID=" + currentUUID);
//upvote this
vote(1, currentUUID, true);
}
}
}