diff --git a/SB.js b/SB.js index aeb524dc..0e0f82e1 100644 --- a/SB.js +++ b/SB.js @@ -160,7 +160,8 @@ SB.defaults = { "hideDeleteButtonPlayerControls": false, "hideDiscordLaunches": 0, "hideDiscordLink": false, - "invidiousInstances": ["invidio.us", "invidiou.sh", "invidious.snopyta.org"] + "invidiousInstances": ["invidio.us", "invidiou.sh", "invidious.snopyta.org"], + "autoUpvote": true } // Reset config diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 3dca55b5..4157ae1c 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -374,5 +374,11 @@ }, "currentInstances": { "message": "Current Instances:" + }, + "enableAutoUpvote": { + "message": "Auto Upvote" + }, + "whatAutoUpvote": { + "message": "With this enabled, the extension will upvote all submissions you view if you do not report them. If the notice is disabled, this will not occur." } } diff --git a/content.js b/content.js index b165dafd..1d85de16 100644 --- a/content.js +++ b/content.js @@ -556,8 +556,9 @@ function skipToTime(v, index, sponsorTimes, openNotice) { //send out the message saying that a sponsor message was skipped if (!SB.config.dontShowNotice) { let skipNotice = new SkipNotice(this, currentUUID, SB.config.disableAutoSkip); + //auto-upvote this sponsor - if (SB.config.trackViewCount && !SB.config.disableAutoSkip) { + if (SB.config.trackViewCount && !SB.config.disableAutoSkip && SB.config.autoUpvote) { vote(1, currentUUID, null); } } diff --git a/options/options.html b/options/options.html index b76c3e0a..2278e4d3 100644 --- a/options/options.html +++ b/options/options.html @@ -181,6 +181,23 @@