From 50517eb462a14309440e2b946d135518f3846580 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Mon, 9 Mar 2020 11:15:29 -0400 Subject: [PATCH 1/4] Switched upload to release action --- .github/workflows/release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2e6d2a33..b3aaacaf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -62,15 +62,15 @@ jobs: # Upload each release asset - name: Upload to release - uses: JasonEtco/upload-to-release@master + uses: Shopify/upload-to-release@master with: - args: ./builds/ChromeExtension.zip + args: builds/ChromeExtension.zip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload to release - uses: JasonEtco/upload-to-release@master + uses: Shopify/upload-to-release@master with: - args: ./builds/FirefoxExtension.zip + args: builds/FirefoxExtension.zip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 760c08dd0c2311f15637fad5d9b073f9ed6b3279 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Mon, 9 Mar 2020 18:07:06 -0400 Subject: [PATCH 2/4] Prevent manual skips from triggering a view --- src/content.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/content.ts b/src/content.ts index 8488242b..ef3474e6 100644 --- a/src/content.ts +++ b/src/content.ts @@ -848,16 +848,14 @@ function skipToTime(v, index, sponsorTimes, openNotice) { } //send telemetry that a this sponsor was skipped - if (Config.config.trackViewCount && !sponsorSkipped[index]) { + if (Config.config.trackViewCount && !sponsorSkipped[index] && !Config.config.disableAutoSkip) { utils.sendRequestToServer("POST", "/api/viewedVideoSponsorTime?UUID=" + currentUUID); - if (!Config.config.disableAutoSkip) { - // Count this as a skip - Config.config.minutesSaved = Config.config.minutesSaved + (sponsorTimes[index][1] - sponsorTimes[index][0]) / 60; - Config.config.skipCount = Config.config.skipCount + 1; + // Count this as a skip + Config.config.minutesSaved = Config.config.minutesSaved + (sponsorTimes[index][1] - sponsorTimes[index][0]) / 60; + Config.config.skipCount = Config.config.skipCount + 1; - sponsorSkipped[index] = true; - } + sponsorSkipped[index] = true; } } } From d2bb4b38e353ee5cf4542a918d3b6025d2d4c7d4 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Mon, 9 Mar 2020 18:07:29 -0400 Subject: [PATCH 3/4] Increased version number --- manifest/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest/manifest.json b/manifest/manifest.json index 02243448..409c78fa 100644 --- a/manifest/manifest.json +++ b/manifest/manifest.json @@ -1,7 +1,7 @@ { "name": "__MSG_fullName__", "short_name": "__MSG_Name__", - "version": "1.2.19", + "version": "1.2.20", "default_locale": "en", "description": "__MSG_Description__", "content_scripts": [{ From ff9b2338e0341fbfb175881ee75c50b488a8102f Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Mon, 9 Mar 2020 18:12:05 -0400 Subject: [PATCH 4/4] Fixed scheduling being wrong when manual skip is enabled --- src/content.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content.ts b/src/content.ts index ef3474e6..7017fadc 100644 --- a/src/content.ts +++ b/src/content.ts @@ -463,7 +463,7 @@ function startSponsorSchedule(currentTime?: number): void { skipToTime(video, skipInfo.index, skipInfo.array, skipInfo.openNotice); } - startSponsorSchedule(skipTime[1]); + startSponsorSchedule(skipTime[0] + 0.001); }; if (timeUntilSponsor <= 0) {