diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 48365c37..2437a778 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,11 +68,13 @@ jobs: with: args: builds/ChromeExtension.zip name: ChromeExtension.zip + path: ./builds/ChromeExtension.zip repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Upload to release uses: Shopify/upload-to-release@master with: args: builds/FirefoxExtension.zip name: FirefoxExtension.zip + path: ./builds/FirefoxExtension.zip repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/manifest/manifest.json b/manifest/manifest.json index 8830c74a..5b302f1f 100644 --- a/manifest/manifest.json +++ b/manifest/manifest.json @@ -1,7 +1,7 @@ { "name": "__MSG_fullName__", "short_name": "__MSG_Name__", - "version": "1.2.26", + "version": "1.2.27", "default_locale": "en", "description": "__MSG_Description__", "content_scripts": [{ diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json index 7f1c2bf6..086ce0d5 100644 --- a/public/_locales/en/messages.json +++ b/public/_locales/en/messages.json @@ -189,7 +189,7 @@ "message": "Hide Buttons On YouTube Player" }, "hideButtonsDescription": { - "message": "This hides the buttons that appear on the YouTube player to submit sponsors. I can see this being annoying for some\n people. Instead of using the button there, this popup can be used to submit sponsors. To hide the notice that appears, \n use the button that appears on the notice saying \"Don't show this again\". You can always enable these settings again later." + "message": "This hides the buttons that appear on the YouTube player to submit skip segments." }, "showInfoButton": { "message": "Show Info Button On YouTube Player" @@ -207,7 +207,7 @@ "message": "Show Delete Button On YouTube Player" }, "whatDeleteButton": { - "message": "This is the button that allows you to clear all sponsors on the YouTube player." + "message": "This is the button on the YouTube player that will clear all your un-submitted segments for the current video." }, "disableViewTracking": { "message": "Disable Sponsor Skip Count Tracking" @@ -420,10 +420,10 @@ "message": "The video has been detected as unlisted. Click cancel if you do not want to check for sponsors." }, "unlistedCheck": { - "message": "Ignore Unlisted Videos" + "message": "Ignore Unlisted/Private Videos" }, "whatUnlistedCheck": { - "message": "This setting will significantly slow down SponsorBlock. Sponsor lookups require sending the video ID to the server. If you are concerned about unlisted video IDs being sent over the internet, enable this option." + "message": "This setting will slightly slow down SponsorBlock. Sponsor lookups require sending the video ID to the server. If you are concerned about unlisted video IDs being sent over the internet, enable this option." }, "mobileUpdateInfo": { "message": "m.youtube.com is now supported" @@ -527,5 +527,32 @@ }, "moreCategories": { "message": "More Categories" + }, + "bracketEnd": { + "message": "(End)" + }, + "hiddenDueToDownvote": { + "message": "hidden: downvote" + }, + "hiddenDueToDuration": { + "message": "hidden: too short" + }, + "channelDataNotFound": { + "message": "Channel ID not loaded yet." + }, + "adblockerIssue": { + "message": "It seems that something is blocking SponsorBlock's ability to get video data. This is probably your ad blocker. Please check https://github.com/ajayyy/SponsorBlock/wiki/Fix-Ad-Blocker-Blocking-SponsorBlock's-Requests" + }, + "itCouldBeAdblockerIssue": { + "message": "If this keeps occuring, it could be caused by your ad blocker. Please check https://github.com/ajayyy/SponsorBlock/wiki/Fix-Ad-Blocker-Blocking-SponsorBlock's-Requests" + }, + "forceChannelCheck": { + "message": "Force Channel Check Before Skipping Sponsors" + }, + "whatForceChannelCheck": { + "message": "By default, it will skip sponsors right away before it even knows what the channel is. By default, some zero second sponsors might be skipped on whitelisted channels. Enabling this option will prevent this but making all skipping have a slight delay as getting the channelID can take some time. This delay might be unnoticeable if you have fast internet." + }, + "forceChannelCheckPopup": { + "message": "Consider Enabling Force Channel Check Before Skipping Sponsors" } } diff --git a/public/content.css b/public/content.css index 24d8b9ac..51213bd2 100644 --- a/public/content.css +++ b/public/content.css @@ -83,6 +83,8 @@ border-spacing: 5px 10px; padding-left: 5px; padding-right: 5px; + + border-collapse: unset; } .sponsorSkipNoticeFadeIn { diff --git a/public/popup.css b/public/popup.css index dccfd881..fab03e3d 100644 --- a/public/popup.css +++ b/public/popup.css @@ -39,10 +39,8 @@ sub.popupElement { vertical-align: text-bottom; } -.popupElement { - font-family: 'Source Sans Pro', sans-serif; - - color: black; +.logoText { + color: white; } h1.popupElement { @@ -52,12 +50,21 @@ h1.popupElement { .popupBody { font-size: 14px; - background-color: #ffd9d9; + background-color: #333; padding: 0px 5px; + + font-family: 'Source Sans Pro', sans-serif; + + color: #dddddd; +} + +.outerPopupBody { + background-color: #222626; + overflow-y: scroll; } .discreteLink.popupElement { - color: black; + color: #dddddd; } .recordingSubtitle.popupElement { @@ -102,7 +109,7 @@ h1.popupElement { } .whitelistButton.popupElement { - background-color:#3acc3a; + background-color:#27a52d; -moz-border-radius:28px; -webkit-border-radius:28px; border-radius:28px; @@ -114,13 +121,15 @@ h1.popupElement { padding:8px 37px; text-decoration:none; text-shadow:0px 0px 0px #27663c; - } + + transition: 0.01s background-color; +} .whitelistButton:hover.popupElement { - background-color:#218b26; + background-color:#3acc3a; } .whitelistButton:focus.popupElement { outline: none; - background-color:#218b26; + background-color:#3acc3a; } .whitelistButton:active.popupElement { position:relative; @@ -128,25 +137,27 @@ h1.popupElement { } .greenButton.popupElement { - background-color:#ec1c1c; + background-color:#cc1717; -moz-border-radius:28px; -webkit-border-radius:28px; border-radius:28px; - border:1px solid #d31919; + border: none; display:inline-block; cursor:pointer; color:#ffffff; font-size:16px; padding:8px 37px; text-decoration:none; - text-shadow:0px 0px 0px #662727; + text-shadow:0px 0px 0px #662727; + + transition: 0.01s background-color; } .greenButton:hover.popupElement { - background-color:#bf2a2a; + background-color:#ec1c1c; } .greenButton:focus.popupElement { outline: none; - background-color:#bf2a2a; + background-color:#ec1c1c; } .greenButton:active.popupElement { position:relative; @@ -154,14 +165,11 @@ h1.popupElement { } .dangerButton.popupElement { - -moz-box-shadow:inset 0px 1px 0px 0px #cf866c; - -webkit-box-shadow:inset 0px 1px 0px 0px #cf866c; - box-shadow:inset 0px 1px 0px 0px #cf866c; - background-color:#d0451b; + background-color:#bc3315; -moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; - border:1px solid #942911; + border: none; display:inline-block; cursor:pointer; color:#ffffff; @@ -171,11 +179,11 @@ h1.popupElement { text-shadow:0px 1px 0px #854629; } .dangerButton:hover.popupElement { - background-color:#bc3315; + background-color:#d0451b; } .dangerButton:focus.popupElement { outline: none; - background-color:#bc3315; + background-color:#d0451b; } .dangerButton:active.popupElement { position:relative; @@ -183,14 +191,11 @@ h1.popupElement { } .warningButton.popupElement { - -moz-box-shadow:inset 0px 1px 0px 0px #cfbd6c; - -webkit-box-shadow:inset 0px 1px 0px 0px #cfbd6c; - box-shadow:inset 0px 1px 0px 0px #cfbd6c; - background-color:#d0821b; + background-color:#bc8215; -moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; - border:1px solid #948b11; + border: none; display:inline-block; cursor:pointer; color:#ffffff; @@ -200,11 +205,11 @@ h1.popupElement { text-shadow:0px 1px 0px #856829; } .warningButton:hover.popupElement { - background-color:#bc8215; + background-color:#d0821b; } .warningButton:focus.popupElement { outline: none; - background-color:#bc8215; + background-color:#d0821b; } .warningButton:active.popupElement { position:relative; diff --git a/public/popup.html b/public/popup.html index aa8060a8..3fdb3a73 100644 --- a/public/popup.html +++ b/public/popup.html @@ -5,10 +5,10 @@ - +
-

+

__MSG_Name__

@@ -71,6 +71,10 @@ + +

diff --git a/src/background.ts b/src/background.ts index 1582327c..b204b64c 100644 --- a/src/background.ts +++ b/src/background.ts @@ -31,11 +31,6 @@ chrome.runtime.onMessage.addListener(function (request, sender, callback) { case "openConfig": chrome.runtime.openOptionsPage(); return - case "submitTimes": - submitTimes(request.videoID, callback); - - //this allows the callback to be called later by the submitTimes function - return true; case "addSponsorTime": addSponsorTime(request.time, request.videoID, callback); @@ -182,61 +177,4 @@ function submitVote(type, UUID, callback) { } }); -} - -async function submitTimes(videoID: string, callback) { - //get the video times from storage - let sponsorTimes = Config.config.sponsorTimes.get(videoID); - let userID = Config.config.userID; - - if (sponsorTimes != undefined && sponsorTimes.length > 0) { - let durationResult = await new Promise((resolve, reject) => { - chrome.tabs.query({ - active: true, - currentWindow: true - }, function(tabs) { - chrome.tabs.sendMessage(tabs[0].id, { - message: "getVideoDuration" - }, (response) => resolve(response)); - }); - }); - - //check if a sponsor exceeds the duration of the video - for (let i = 0; i < sponsorTimes.length; i++) { - if (sponsorTimes[i][1] > durationResult.duration) { - sponsorTimes[i][1] = durationResult.duration; - } - } - - //submit these times - for (let i = 0; i < sponsorTimes.length; i++) { - //to prevent it from happeneing twice - let increasedContributionAmount = false; - - //submit the sponsorTime - utils.sendRequestToServer("GET", "/api/postVideoSponsorTimes?videoID=" + videoID + "&startTime=" + sponsorTimes[i][0] + "&endTime=" + sponsorTimes[i][1] - + "&userID=" + userID, function(xmlhttp, error) { - if (xmlhttp.readyState == 4 && !error) { - callback({ - statusCode: xmlhttp.status, - responseText: xmlhttp.responseText - }); - - - - if (xmlhttp.status == 200) { - //save the amount contributed - if (!increasedContributionAmount) { - increasedContributionAmount = true; - Config.config.sponsorTimesContributed = Config.config.sponsorTimesContributed + sponsorTimes.length; - } - } - } else if (error) { - callback({ - statusCode: -1 - }); - } - }); - } - } } \ No newline at end of file diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index 08d817e6..8d53efbb 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import Config from "../config" -import { ContentContainer } from "../types"; +import { ContentContainer, SponsorHideType } from "../types"; import Utils from "../utils"; var utils = new Utils(); @@ -269,7 +269,7 @@ class SkipNoticeComponent extends React.Component