From 73b8d82b0fbefc2c20c157512e238e9f85912e13 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Thu, 15 Aug 2019 11:12:46 -0400 Subject: [PATCH] Made view count tracking work when the notice is disabled --- content.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/content.js b/content.js index c05cd9ad..c3715ad0 100644 --- a/content.js +++ b/content.js @@ -513,14 +513,16 @@ function skipToTime(v, index, sponsorTimes, openNotice) { setTimeout(() => closeSkipNotice(currentUUID), 7000); - //send telemetry that a this sponsor was skipped happened + //auto-upvote this sponsor if (trackViewCount) { - sendRequestToServer("GET", "/api/viewedVideoSponsorTime?UUID=" + currentUUID); - - //upvote this vote(1, currentUUID, true); } } + + //send telemetry that a this sponsor was skipped happened + if (trackViewCount) { + sendRequestToServer("GET", "/api/viewedVideoSponsorTime?UUID=" + currentUUID); + } } function goBackToPreviousTime(UUID) {