From 3c19023882d9e74bcf045250b2675aaa91b98753 Mon Sep 17 00:00:00 2001
From: FireMasterK <20838718+FireMasterK@users.noreply.github.com>
Date: Mon, 19 Jul 2021 01:23:17 +0530
Subject: [PATCH] Add support for Sponsorblock's Preview/Recap sections.
Closes #276
---
src/components/Preferences.vue | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/components/Preferences.vue b/src/components/Preferences.vue
index 27f437b5..f3ce7c81 100644
--- a/src/components/Preferences.vue
+++ b/src/components/Preferences.vue
@@ -19,6 +19,10 @@
+ Skip Preview/Recap
+
+
+
Skip Interaction Reminder (Subscribe)
@@ -107,6 +111,7 @@ export default {
skipSponsor: true,
skipIntro: false,
skipOutro: false,
+ skipPreview: false,
skipInteraction: true,
skipSelfPromo: true,
skipMusicOffTopic: true,
@@ -151,7 +156,7 @@ export default {
this.sponsorBlock = this.getPreferenceBoolean("sponsorblock", true);
if (localStorage.getItem("selectedSkip") !== null) {
var skipList = localStorage.getItem("selectedSkip").split(",");
- this.skipSponsor = this.skipIntro = this.skipOutro = this.skipInteraction = this.skipSelfPromo = this.skipMusicOffTopic = false;
+ this.skipSponsor = this.skipIntro = this.skipOutro = this.skipPreview = this.skipInteraction = this.skipSelfPromo = this.skipMusicOffTopic = false;
skipList.forEach(skip => {
switch (skip) {
case "sponsor":
@@ -163,6 +168,9 @@ export default {
case "outro":
this.skipOutro = true;
break;
+ case "preview":
+ this.skipPreview = true;
+ break;
case "interaction":
this.skipInteraction = true;
break;
@@ -201,6 +209,7 @@ export default {
if (this.skipSponsor) sponsorSelected.push("sponsor");
if (this.skipIntro) sponsorSelected.push("intro");
if (this.skipOutro) sponsorSelected.push("outro");
+ if (this.skipPreview) sponsorSelected.push("preview");
if (this.skipInteraction) sponsorSelected.push("interaction");
if (this.skipSelfPromo) sponsorSelected.push("selfpromo");
if (this.skipMusicOffTopic) sponsorSelected.push("music_offtopic");