aboutsummaryrefslogtreecommitdiffhomepage
path: root/content.js
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2019-12-02 23:58:29 -0500
committerAjay Ramachandran <[email protected]>2019-12-02 23:58:29 -0500
commitcd5207f816ab2b5cee6dd58a70c26ec190637e2c (patch)
treeb842d835a56743ed709be7273284c915187e7043 /content.js
parent381c11ed999f2e64b5f80bc875d6ddba2cee1377 (diff)
downloadSponsorBlock-cd5207f816ab2b5cee6dd58a70c26ec190637e2c.tar.gz
SponsorBlock-cd5207f816ab2b5cee6dd58a70c26ec190637e2c.zip
Added ability to disable auto skip.
Resolves https://github.com/ajayyy/SponsorBlock/issues/131 and https://github.com/ajayyy/SponsorBlock/issues/162
Diffstat (limited to 'content.js')
-rw-r--r--content.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/content.js b/content.js
index dca60474..5c90a964 100644
--- a/content.js
+++ b/content.js
@@ -76,6 +76,15 @@ chrome.storage.sync.get(["disableSkipping"], function(result) {
}
});
+//should skips be manual
+var disableAutoSkip = false;
+chrome.storage.sync.get(["disableAutoSkip"], function(result) {
+ let disableAutoSkipStorage = result.disableAutoSkip;
+ if (disableAutoSkipStorage != undefined) {
+ disableAutoSkip = disableAutoSkipStorage;
+ }
+});
+
//should view counts be tracked
var trackViewCount = false;
chrome.storage.sync.get(["trackViewCount"], function(result) {
@@ -606,7 +615,9 @@ function checkIfTimeToSkip(currentVideoTime, startTime, endTime) {
//skip fromt he start time to the end time for a certain index sponsor time
function skipToTime(v, index, sponsorTimes, openNotice) {
- v.currentTime = sponsorTimes[index][1];
+ if (!disableAutoSkip) {
+ v.currentTime = sponsorTimes[index][1];
+ }
lastSponsorTimeSkipped = sponsorTimes[index][0];
@@ -616,7 +627,7 @@ function skipToTime(v, index, sponsorTimes, openNotice) {
if (openNotice) {
//send out the message saying that a sponsor message was skipped
if (!dontShowNotice) {
- let skipNotice = new SkipNotice(this, currentUUID);
+ let skipNotice = new SkipNotice(this, currentUUID, disableAutoSkip);
if (dontShowNoticeOld) {
//show why this notice is showing