From aa8225c1961e2518cf5a618762daf7554d6d287d Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sun, 10 May 2020 23:16:35 -0400 Subject: [PATCH 1/6] Fixed release CI --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1043661f..f718dfa3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -72,8 +72,8 @@ jobs: run: sudo apt-get install rename - name: Install signed file run: cd ./web-ext-artifacts - run: rename 's/.*/FirefoxSignedInstaller.xpi/' * - run: cd .. + - run: rename 's/.*/FirefoxSignedInstaller.xpi/' * + - run: cd .. - uses: actions/upload-artifact@v1 with: name: FirefoxExtensionSigned.xpi From b1d9cde715727de5aa037f022785106edb6c1473 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Mon, 11 May 2020 18:28:27 -0400 Subject: [PATCH 2/6] Added code to remove off-topic from category selections. That category has been removed. --- src/config.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/config.ts b/src/config.ts index c6d285f2..5b7b9929 100644 --- a/src/config.ts +++ b/src/config.ts @@ -281,6 +281,16 @@ async function migrateOldFormats() { Config.config.whitelistedChannels = newChannelList; } + + // Check if off-topic category needs to be removed + for (let i = 0; i < Config.config.categorySelections.length; i++) { + if (Config.config.categorySelections[i].name === "offtopic") { + Config.config.categorySelections.splice(i); + // Call set listener + Config.config.categorySelections = Config.config.categorySelections; + break; + } + } } async function setupConfig() { From 3fb5c1c14fc7e1338984fb02587a6e91f80c602a Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Mon, 11 May 2020 18:35:07 -0400 Subject: [PATCH 3/6] Only splice 1 when removing offtopic category selection --- src/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index 5b7b9929..7b8fe15b 100644 --- a/src/config.ts +++ b/src/config.ts @@ -285,7 +285,7 @@ async function migrateOldFormats() { // Check if off-topic category needs to be removed for (let i = 0; i < Config.config.categorySelections.length; i++) { if (Config.config.categorySelections[i].name === "offtopic") { - Config.config.categorySelections.splice(i); + Config.config.categorySelections.splice(i, 1); // Call set listener Config.config.categorySelections = Config.config.categorySelections; break; From ac3d27bf8837a76c9c5b7677911bb86cb6f45973 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Mon, 11 May 2020 18:36:07 -0400 Subject: [PATCH 4/6] Changed instances of splice to only remove one --- src/components/SponsorTimeEditComponent.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SponsorTimeEditComponent.tsx b/src/components/SponsorTimeEditComponent.tsx index e8530dde..d6114788 100644 --- a/src/components/SponsorTimeEditComponent.tsx +++ b/src/components/SponsorTimeEditComponent.tsx @@ -59,7 +59,7 @@ class SponsorTimeEditComponent extends React.Component Date: Mon, 11 May 2020 19:27:26 -0400 Subject: [PATCH 5/6] Changed endscreen check to use replay button instead. --- src/content.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/content.ts b/src/content.ts index 42f8dc42..6d234a9a 100644 --- a/src/content.ts +++ b/src/content.ts @@ -1130,13 +1130,16 @@ function getRoughCurrentTime(): number { let htmlCurrentTimeString = document.querySelector(".ytp-time-current").textContent; let htmlDurationString = document.querySelector(".ytp-time-duration").textContent; - // Used to check if endscreen content is visible - let endScreenContent = document.querySelector(".ytp-endscreen-content"); - // Used to check autoplay display - let autoPlayDisplay: HTMLDivElement = document.querySelector(".ytp-upnext"); + if (htmlCurrentTimeString == htmlDurationString) { + // At the end of the video + return video.duration; + } - if (htmlCurrentTimeString == htmlDurationString - || endScreenContent.childElementCount > 0 || autoPlayDisplay.style.display !== "none") { + // Used to check if replay button + let playButtonSVGData = document.querySelector("ytp-play-button")?.querySelector("ytp-svg-fill")?.getAttribute("d"); + let replaceSVGData = "M 18,11 V 7 l -5,5 5,5 v -4 c 3.3,0 6,2.7 6,6 0,3.3 -2.7,6 -6,6 -3.3,0 -6,-2.7 -6,-6 h -2 c 0,4.4 3.6,8 8,8 4.4,0 8,-3.6 8,-8 0,-4.4 -3.6,-8 -8,-8 z"; + + if (playButtonSVGData === replaceSVGData) { // At the end of the video return video.duration; } From 70239bc04583a1e10e23c0c99469cf46ac7d3c56 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Mon, 11 May 2020 19:28:02 -0400 Subject: [PATCH 6/6] Increase version number --- manifest/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest/manifest.json b/manifest/manifest.json index 7a41a671..a7b4369f 100644 --- a/manifest/manifest.json +++ b/manifest/manifest.json @@ -1,7 +1,7 @@ { "name": "__MSG_fullName__", "short_name": "__MSG_Name__", - "version": "1.2.28", + "version": "1.2.28.1", "default_locale": "en", "description": "__MSG_Description__", "content_scripts": [{