diff --git a/_locales/en/messages.json b/_locales/en/messages.json index cbfed2b0..fa3a409d 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -141,9 +141,6 @@ "removeFromWhitelist": { "message": "Remove Channel From Whitelist" }, - "whitelistDescription": { - "message": "Whitelist the channels who do sponsorships ethically to encourage good behavior, or maybe if they are just entertaining and funny. Or don't, that's your call." - }, "voteOnTime": { "message": "Vote On A Sponsor Time" }, @@ -265,5 +262,11 @@ }, "0": { "message": "Connection Timeout. Check your internet connection. If your internet is working, the server is probably overloaded or down." + }, + "disableSkipping": { + "message": "Disable SponsorBlock" + }, + "enableSkipping": { + "message": "Enable SponsorBlock" } } diff --git a/content.js b/content.js index 86899f08..920f0cd6 100644 --- a/content.js +++ b/content.js @@ -67,6 +67,15 @@ var sponsorTimesSubmitting = []; //this is used to close the popup on YouTube when the other popup opens var popupInitialised = false; +//should skips happen at all +var disableSkipping = false; +chrome.storage.sync.get(["disableSkipping"], function(result) { + let disableSkippingStorage = result.disableSkipping; + if (disableSkippingStorage != undefined) { + disableSkipping = disableSkippingStorage; + } +}); + //should view counts be tracked var trackViewCount = false; chrome.storage.sync.get(["trackViewCount"], function(result) { @@ -439,9 +448,11 @@ function sponsorsLookup(id, channelIDPromise) { }); //add the event to run on the videos "ontimeupdate" - v.ontimeupdate = function () { - sponsorCheck(); - }; + if (!disableSkipping) { + v.ontimeupdate = function () { + sponsorCheck(); + }; + } } function updatePreviewBar() { @@ -531,6 +542,12 @@ function whitelistCheck() { //video skipping function sponsorCheck() { + if (disableSkipping) { + // Make sure this isn't called again + v.ontimeupdate = null; + return; + } + let skipHappened = false; if (sponsorTimes != null) { diff --git a/popup.css b/popup.css index 182b2015..dccfd881 100644 --- a/popup.css +++ b/popup.css @@ -35,6 +35,10 @@ sub.popupElement { } /* end reset */ +#sponsorBlockPopupLogo { + vertical-align: text-bottom; +} + .popupElement { font-family: 'Source Sans Pro', sans-serif; @@ -43,12 +47,13 @@ sub.popupElement { h1.popupElement { margin-top: 0px; + margin-bottom: 10px; } .popupBody { font-size: 14px; background-color: #ffd9d9; - padding: 5px; + padding: 0px 5px; } .discreteLink.popupElement { diff --git a/popup.html b/popup.html index a2923eb0..503c7cef 100644 --- a/popup.html +++ b/popup.html @@ -8,9 +8,10 @@
__MSG_Loading__
@@ -32,11 +33,14 @@