Compact button options and add option for skip to highlight button

This commit is contained in:
Ajay Ramachandran 2021-09-30 19:23:17 -04:00
parent 59f8f82655
commit 1bfb5cfb13
4 changed files with 29 additions and 34 deletions

View file

@ -182,15 +182,15 @@
"hideButtonsDescription": {
"message": "This hides the buttons that appear on the YouTube player to submit skip segments."
},
"showSkipButton": {
"message": "Keep Skip to Highlight Button on Player"
},
"showInfoButton": {
"message": "Show Info Button On YouTube Player"
},
"hideInfoButton": {
"message": "Hide Info Button On YouTube Player"
},
"whatInfoButton": {
"message": "This is the button that opens up a popup in the YouTube page."
},
"autoHideInfoButton": {
"message": "Auto-hide Info Button"
},
@ -200,9 +200,6 @@
"showDeleteButton": {
"message": "Show Delete Button On YouTube Player"
},
"whatDeleteButton": {
"message": "This is the button on the YouTube player that will clear all your un-submitted segments for the current video."
},
"enableViewTracking": {
"message": "Enable Skip Count Tracking"
},
@ -442,9 +439,6 @@
"showUploadButton": {
"message": "Show Upload Button"
},
"whatUploadButton": {
"message": "This button appears on the YouTube player after you have selected a timestamp and are ready to submit."
},
"customServerAddress": {
"message": "SponsorBlock Server Address"
},

View file

@ -287,7 +287,22 @@
<div class="small-description">__MSG_hideButtonsDescription__</div>
</div>
<br/>
<div option-type="toggle" toggle-type="reverse" sync-option="hideSkipButtonPlayerControls">
<label class="switch-container">
<label class="switch">
<input type="checkbox" checked>
<span class="slider round"></span>
</label>
<div class="switch-label">
__MSG_showSkipButton__
</div>
</label>
</div>
<br/>
<br/>
<br/>
@ -301,14 +316,9 @@
__MSG_showInfoButton__
</div>
</label>
<br/>
<br/>
<br/>
<div class="small-description">__MSG_whatInfoButton__</div>
</div>
<br/>
<br/>
<br/>
@ -322,13 +332,11 @@
__MSG_autoHideInfoButton__
</div>
</label>
<br/>
<br/>
<br/>
<br/>
</div>
<br/>
<br/>
<br/>
<div option-type="toggle" toggle-type="reverse" sync-option="hideDeleteButtonPlayerControls">
<label class="switch-container">
@ -340,14 +348,9 @@
__MSG_showDeleteButton__
</div>
</label>
<br/>
<br/>
<br/>
<div class="small-description">__MSG_whatDeleteButton__</div>
</div>
<br/>
<br/>
<br/>
@ -361,14 +364,10 @@
__MSG_showUploadButton__
</div>
</label>
<br/>
<br/>
<br/>
<div class="small-description">__MSG_whatUploadButton__</div>
</div>
<br/>
<br/>
<br/>
<br/>

View file

@ -26,6 +26,7 @@ interface SBConfig {
hideInfoButtonPlayerControls: boolean,
hideDeleteButtonPlayerControls: boolean,
hideUploadButtonPlayerControls: boolean,
hideSkipButtonPlayerControls: boolean,
hideDiscordLaunches: number,
hideDiscordLink: boolean,
invidiousInstances: string[],
@ -172,6 +173,7 @@ const Config: SBObject = {
hideInfoButtonPlayerControls: false,
hideDeleteButtonPlayerControls: false,
hideUploadButtonPlayerControls: false,
hideSkipButtonPlayerControls: false,
hideDiscordLaunches: 0,
hideDiscordLink: false,
invidiousInstances: ["invidious.snopyta.org"],

View file

@ -111,7 +111,7 @@ export class SkipButtonControlBar {
}
disableText(): void {
if (Config.config.hideVideoPlayerControls) {
if (Config.config.hideVideoPlayerControls || Config.config.hideSkipButtonPlayerControls) {
this.disable();
return;
}