mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 20:17:05 +03:00
Seperated show upload button option from info button.
This commit is contained in:
@@ -395,5 +395,11 @@
|
|||||||
},
|
},
|
||||||
"shortCheck": {
|
"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?"
|
"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/>
|
||||||
<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">
|
<div option-type="toggle" sync-option="autoUpvote">
|
||||||
<label class="switch-container" label-name="__MSG_enableAutoUpvote__">
|
<label class="switch-container" label-name="__MSG_enableAutoUpvote__">
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ interface SBConfig {
|
|||||||
hideVideoPlayerControls: boolean,
|
hideVideoPlayerControls: boolean,
|
||||||
hideInfoButtonPlayerControls: boolean,
|
hideInfoButtonPlayerControls: boolean,
|
||||||
hideDeleteButtonPlayerControls: boolean,
|
hideDeleteButtonPlayerControls: boolean,
|
||||||
|
hideUploadButtonPlayerControls: boolean,
|
||||||
hideDiscordLaunches: number,
|
hideDiscordLaunches: number,
|
||||||
hideDiscordLink: boolean,
|
hideDiscordLink: boolean,
|
||||||
invidiousInstances: string[],
|
invidiousInstances: string[],
|
||||||
@@ -107,6 +108,7 @@ var Config: SBObject = {
|
|||||||
hideVideoPlayerControls: false,
|
hideVideoPlayerControls: false,
|
||||||
hideInfoButtonPlayerControls: false,
|
hideInfoButtonPlayerControls: false,
|
||||||
hideDeleteButtonPlayerControls: false,
|
hideDeleteButtonPlayerControls: false,
|
||||||
|
hideUploadButtonPlayerControls: false,
|
||||||
hideDiscordLaunches: 0,
|
hideDiscordLaunches: 0,
|
||||||
hideDiscordLink: false,
|
hideDiscordLink: false,
|
||||||
invidiousInstances: ["invidio.us", "invidiou.sh", "invidious.snopyta.org"],
|
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");
|
(<HTMLImageElement> document.getElementById("startSponsorImage")).src = chrome.extension.getURL("icons/PlayerStartIconSponsorBlocker256px.png");
|
||||||
document.getElementById("startSponsorButton").setAttribute("title", chrome.i18n.getMessage("sponsorStart"));
|
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";
|
document.getElementById("submitButton").style.display = "unset";
|
||||||
} else if (!uploadButtonVisible) {
|
} else if (!uploadButtonVisible) {
|
||||||
//disable submit button
|
//disable submit button
|
||||||
|
|||||||
Reference in New Issue
Block a user