mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-12-26 07:23:35 +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)"
|
||||
/>
|
||||
<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>
|
||||
<br />
|
||||
<select id="ddlTheme" v-model="selectedTheme" class="select w-auto" @change="onChange($event)">
|
||||
@ -193,6 +201,8 @@ export default {
|
||||
skipInteraction: true,
|
||||
skipSelfPromo: true,
|
||||
skipMusicOffTopic: true,
|
||||
skipHighlight: false,
|
||||
skipFiller: false,
|
||||
selectedTheme: "dark",
|
||||
autoPlayVideo: true,
|
||||
listen: false,
|
||||
@ -288,6 +298,8 @@ export default {
|
||||
this.skipInteraction =
|
||||
this.skipSelfPromo =
|
||||
this.skipMusicOffTopic =
|
||||
this.skipHighlight =
|
||||
this.skipFiller =
|
||||
false;
|
||||
skipList.forEach(skip => {
|
||||
switch (skip) {
|
||||
@ -312,6 +324,12 @@ export default {
|
||||
case "music_offtopic":
|
||||
this.skipMusicOffTopic = true;
|
||||
break;
|
||||
case "poi_highlight":
|
||||
this.skipHighlight = true;
|
||||
break;
|
||||
case "filler":
|
||||
this.skipFiller = true;
|
||||
break;
|
||||
default:
|
||||
console.log("Unknown sponsor type: " + skip);
|
||||
break;
|
||||
@ -368,6 +386,8 @@ export default {
|
||||
if (this.skipInteraction) sponsorSelected.push("interaction");
|
||||
if (this.skipSelfPromo) sponsorSelected.push("selfpromo");
|
||||
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("theme", this.selectedTheme);
|
||||
|
@ -30,6 +30,8 @@
|
||||
"skip_interaction": "Skip Interaction Reminder (Subscribe)",
|
||||
"skip_self_promo": "Skip Unpaid/Self Promotion",
|
||||
"skip_non_music": "Skip Music: Non-Music Section",
|
||||
"skip_highlight": "Skip Highlight",
|
||||
"skip_filler_tangent": "Skip Filler Tangent",
|
||||
"theme": "Theme",
|
||||
"auto": "Auto",
|
||||
"dark": "Dark",
|
||||
|
Loading…
Reference in New Issue
Block a user