mirror of
https://github.com/TeamPiped/Piped.git
synced 2025-04-26 08:36:32 +00:00
Add support for sponsorblock's filler and highlight skipping.
This commit is contained in:
parent
6f1bb9445d
commit
8f10ee5c72
@ -62,6 +62,14 @@
|
|||||||
@change="onChange($event)"
|
@change="onChange($event)"
|
||||||
/>
|
/>
|
||||||
<br />
|
<br />
|
||||||
|
<label for="chkSkipHighlight"><strong v-t="'actions.skip_highlight'" /></label>
|
||||||
|
<br />
|
||||||
|
<input id="chkSkipHighlight" v-model="skipHighlight" class="checkbox" type="checkbox" @change="onChange($event)" />
|
||||||
|
<br />
|
||||||
|
<label for="chkSkipFiller"><strong v-t="'actions.skip_filler_tangent'" /></label>
|
||||||
|
<br />
|
||||||
|
<input id="chkSkipFiller" v-model="skipFiller" class="checkbox" type="checkbox" @change="onChange($event)" />
|
||||||
|
<br />
|
||||||
<label for="ddlTheme"><strong v-t="'actions.theme'" /></label>
|
<label for="ddlTheme"><strong v-t="'actions.theme'" /></label>
|
||||||
<br />
|
<br />
|
||||||
<select id="ddlTheme" v-model="selectedTheme" class="select w-auto" @change="onChange($event)">
|
<select id="ddlTheme" v-model="selectedTheme" class="select w-auto" @change="onChange($event)">
|
||||||
@ -193,6 +201,8 @@ export default {
|
|||||||
skipInteraction: true,
|
skipInteraction: true,
|
||||||
skipSelfPromo: true,
|
skipSelfPromo: true,
|
||||||
skipMusicOffTopic: true,
|
skipMusicOffTopic: true,
|
||||||
|
skipHighlight: false,
|
||||||
|
skipFiller: false,
|
||||||
selectedTheme: "dark",
|
selectedTheme: "dark",
|
||||||
autoPlayVideo: true,
|
autoPlayVideo: true,
|
||||||
listen: false,
|
listen: false,
|
||||||
@ -288,6 +298,8 @@ export default {
|
|||||||
this.skipInteraction =
|
this.skipInteraction =
|
||||||
this.skipSelfPromo =
|
this.skipSelfPromo =
|
||||||
this.skipMusicOffTopic =
|
this.skipMusicOffTopic =
|
||||||
|
this.skipHighlight =
|
||||||
|
this.skipFiller =
|
||||||
false;
|
false;
|
||||||
skipList.forEach(skip => {
|
skipList.forEach(skip => {
|
||||||
switch (skip) {
|
switch (skip) {
|
||||||
@ -312,6 +324,12 @@ export default {
|
|||||||
case "music_offtopic":
|
case "music_offtopic":
|
||||||
this.skipMusicOffTopic = true;
|
this.skipMusicOffTopic = true;
|
||||||
break;
|
break;
|
||||||
|
case "poi_highlight":
|
||||||
|
this.skipHighlight = true;
|
||||||
|
break;
|
||||||
|
case "filler":
|
||||||
|
this.skipFiller = true;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
console.log("Unknown sponsor type: " + skip);
|
console.log("Unknown sponsor type: " + skip);
|
||||||
break;
|
break;
|
||||||
@ -368,6 +386,8 @@ export default {
|
|||||||
if (this.skipInteraction) sponsorSelected.push("interaction");
|
if (this.skipInteraction) sponsorSelected.push("interaction");
|
||||||
if (this.skipSelfPromo) sponsorSelected.push("selfpromo");
|
if (this.skipSelfPromo) sponsorSelected.push("selfpromo");
|
||||||
if (this.skipMusicOffTopic) sponsorSelected.push("music_offtopic");
|
if (this.skipMusicOffTopic) sponsorSelected.push("music_offtopic");
|
||||||
|
if (this.skipHighlight) sponsorSelected.push("poi_highlight");
|
||||||
|
if (this.skipFiller) sponsorSelected.push("filler");
|
||||||
localStorage.setItem("selectedSkip", sponsorSelected);
|
localStorage.setItem("selectedSkip", sponsorSelected);
|
||||||
|
|
||||||
localStorage.setItem("theme", this.selectedTheme);
|
localStorage.setItem("theme", this.selectedTheme);
|
||||||
|
@ -30,6 +30,8 @@
|
|||||||
"skip_interaction": "Skip Interaction Reminder (Subscribe)",
|
"skip_interaction": "Skip Interaction Reminder (Subscribe)",
|
||||||
"skip_self_promo": "Skip Unpaid/Self Promotion",
|
"skip_self_promo": "Skip Unpaid/Self Promotion",
|
||||||
"skip_non_music": "Skip Music: Non-Music Section",
|
"skip_non_music": "Skip Music: Non-Music Section",
|
||||||
|
"skip_highlight": "Skip Highlight",
|
||||||
|
"skip_filler_tangent": "Skip Filler Tangent",
|
||||||
"theme": "Theme",
|
"theme": "Theme",
|
||||||
"auto": "Auto",
|
"auto": "Auto",
|
||||||
"dark": "Dark",
|
"dark": "Dark",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user