mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-09-20 04:53:43 +02:00
Seperated show upload button option from info button.
This commit is contained in:
parent
c2eb973a28
commit
51d2886f70
4 changed files with 26 additions and 1 deletions
|
@ -395,5 +395,11 @@
|
|||
},
|
||||
"shortCheck": {
|
||||
"message": "The following submission is shorter than your minimum duration option. This could mean that this is already submitted, and just being ignored due to this option. Are you sure you would like to submit?"
|
||||
},
|
||||
"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."
|
||||
}
|
||||
}
|
||||
|
|
|
@ -201,6 +201,23 @@
|
|||
<br/>
|
||||
<br/>
|
||||
|
||||
<div option-type="toggle" toggle-type="reverse" sync-option="hideUploadButtonPlayerControls">
|
||||
<label class="switch-container" label-name="__MSG_showUploadButton__">
|
||||
<label class="switch">
|
||||
<input type="checkbox" checked>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</label>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<div class="small-description">__MSG_whatUploadButton__</div>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<div option-type="toggle" sync-option="autoUpvote">
|
||||
<label class="switch-container" label-name="__MSG_enableAutoUpvote__">
|
||||
<label class="switch">
|
||||
|
|
|
@ -14,6 +14,7 @@ interface SBConfig {
|
|||
hideVideoPlayerControls: boolean,
|
||||
hideInfoButtonPlayerControls: boolean,
|
||||
hideDeleteButtonPlayerControls: boolean,
|
||||
hideUploadButtonPlayerControls: boolean,
|
||||
hideDiscordLaunches: number,
|
||||
hideDiscordLink: boolean,
|
||||
invidiousInstances: string[],
|
||||
|
@ -107,6 +108,7 @@ var Config: SBObject = {
|
|||
hideVideoPlayerControls: false,
|
||||
hideInfoButtonPlayerControls: false,
|
||||
hideDeleteButtonPlayerControls: false,
|
||||
hideUploadButtonPlayerControls: false,
|
||||
hideDiscordLaunches: 0,
|
||||
hideDiscordLink: false,
|
||||
invidiousInstances: ["invidio.us", "invidiou.sh", "invidious.snopyta.org"],
|
||||
|
|
|
@ -807,7 +807,7 @@ async function changeStartSponsorButton(showStartSponsor, uploadButtonVisible) {
|
|||
(<HTMLImageElement> document.getElementById("startSponsorImage")).src = chrome.extension.getURL("icons/PlayerStartIconSponsorBlocker256px.png");
|
||||
document.getElementById("startSponsorButton").setAttribute("title", chrome.i18n.getMessage("sponsorStart"));
|
||||
|
||||
if (document.getElementById("startSponsorImage").style.display != "none" && uploadButtonVisible && !Config.config.hideInfoButtonPlayerControls) {
|
||||
if (document.getElementById("startSponsorImage").style.display != "none" && uploadButtonVisible && !Config.config.hideUploadButtonPlayerControls) {
|
||||
document.getElementById("submitButton").style.display = "unset";
|
||||
} else if (!uploadButtonVisible) {
|
||||
//disable submit button
|
||||
|
|
Loading…
Reference in a new issue