Changed order of popup. Also fixed discord link.

Resolves https://github.com/ajayyy/SponsorBlock/issues/156.
This commit is contained in:
Ajay Ramachandran 2019-11-24 00:48:35 -05:00
parent 9cb3da4a7f
commit 600f9e4b85
3 changed files with 67 additions and 67 deletions

View file

@ -268,5 +268,9 @@
},
"enableSkipping": {
"message": "Enable SponsorBlock"
},
"yourWork": {
"message": "Your Work",
"description": "Used to describe the section that will show you the statistics from your submissions."
}
}

View file

@ -15,21 +15,74 @@
<!-- Loading text -->
<p id="loadingIndicator" class="popupElement">__MSG_Loading__</p>
<!-- Hidden until loading complete -->
<div id="mainControls" class="main popupElement" style="display: none">
<!-- If the video was found in the database -->
<div id="videoFound">
</div>
<div id="downloadedSponsorMessageTimes" class="popupElement">
</div>
<p class="popupElement">
__MSG_recordTimesDescription__
</p>
<div>
<button id="sponsorStart" class="greenButton popupElement">__MSG_sponsorStart__</button>
</div>
<sub class="popupElement">__MSG_popupHint__</sub>
<div id="submissionSection" class="popupElement" style="display: none">
<h3 class="popupElement">__MSG_lastTimes__</h3>
<b>
<div id="sponsorMessageTimes" class="popupElement">
</div>
</b>
<br/>
<button id="clearTimes" class="smallButton popupElement">__MSG_clearTimesButton__</button>
<div id="submitTimesContainer" class="popupElement" style="display: none">
<br/>
<br/>
<button id="submitTimes" class="smallButton popupElement">__MSG_submitTimesButton__</button>
<div id="submitTimesInfoMessageContainer" class="popupElement" style="display: none">
<h3 id="submitTimesInfoMessage" class="popupElement">
</h3>
</div>
</div>
</div>
<br/>
<div id="discordButtonContainer" class="popupElement" style="display: none">
<br/>
<a href="https://discord.gg/QnmVMpU" class="popupElement" target="_blank"><img src="https://www.logolynx.com/images/logolynx/1b/1bcc0f0aefe71b2c8ce66ffe8645d365.png" height="32px"/></a>
<br/>
__MSG_discordAdvert__
<br/>
<span id="hideDiscordButton" class="smallLink popupElement">__MSG_hideThis__</span>
</div>
<div>
<br/>
<button id="whitelistChannel" class="whitelistButton popupElement">__MSG_whitelistChannel__</button>
<button id="unwhitelistChannel" class="whitelistButton popupElement" style="display: none">__MSG_removeFromWhitelist__</button>
</div>
@ -55,7 +108,7 @@
</div>
<h2 class="recordingSubtitle popupElement">__MSG_recordTimes__</h2>
<h2 class="recordingSubtitle popupElement">__MSG_yourWork__</h2>
<p class="popupElement">
<span id=sponsorTimesContributionsContainer class="popupElement" style="display: none">
@ -84,47 +137,7 @@
</div>
</p>
<p class="popupElement">
__MSG_recordTimesDescription__
</p>
<div>
<button id="sponsorStart" class="greenButton popupElement">__MSG_sponsorStart__</button>
</div>
<sub class="popupElement">__MSG_popupHint__</sub>
<div id="submissionSection" class="popupElement" style="display: none">
<h3 class="popupElement">__MSG_lastTimes__</h3>
<b>
<div id="sponsorMessageTimes" class="popupElement">
</div>
</b>
<br/>
<button id="clearTimes" class="smallButton popupElement">__MSG_clearTimesButton__</button>
<br/>
<br/>
<div id="submitTimesContainer" class="popupElement" style="display: none">
<button id="submitTimes" class="smallButton popupElement">__MSG_submitTimesButton__</button>
<div id="submitTimesInfoMessageContainer" class="popupElement" style="display: none">
<h3 id="submitTimesInfoMessage" class="popupElement">
</h3>
</div>
</div>
</div>
<div id="setUsernameContainer" class="popupElement">
<br/>
<br/>
<button id="setUsernameButton" class="warningButton popupElement">__MSG_setUsername__</button>
<br/>
@ -134,35 +147,18 @@
</div>
<div id="setUsername" class="popupElement" style="display: none">
<br/>
<h3>__MSG_setUsername__</h3>
<div id="setUsernameStatusContainer" style="display: none">
<h2 id="setUsernameStatus"></h2>
</div>
<input id="usernameInput" hint="Username"></input>
<br/>
<br/>
<button id="submitUsername" class="warningButton popupElement">Submit Username</button>
</div>
<div id="discordButtonContainer" class="popupElement" style="display: none">
<br/>
<a href="https://discord.gg/QnmVMpU" class="popupElement" target="_blank"><img src="https://www.logolynx.com/images/logolynx/1b/1bcc0f0aefe71b2c8ce66ffe8645d365.png" height="32px"/></a>
<br/>
__MSG_discordAdvert__
<br/>
<span id="hideDiscordButton" class="smallLink popupElement">__MSG_hideThis__</span>
<button id="submitUsername" class="warningButton popupElement">__MSG_setUsername__</button>
</div>
<div id="optionsButtonContainer" class="popupElement">

View file

@ -126,15 +126,15 @@ function runThePopup() {
if (hideDiscordLink == undefined || !hideDiscordLink) {
chrome.storage.sync.get(["hideDiscordLaunches"], function(result) {
let hideDiscordLaunches = result.hideDiscordLaunches;
//only if less than 5 launches
//only if less than 10 launches
if (hideDiscordLaunches == undefined || hideDiscordLaunches < 10) {
SB.discordButtonContainer.style.display = null;
if (hideDiscordLaunches == undefined) {
hideDiscordButton = 1;
hideDiscordLaunches = 1;
}
chrome.storage.sync.set({"hideDiscordLaunches": hideDiscordButton + 1});
chrome.storage.sync.set({"hideDiscordLaunches": hideDiscordLaunches + 1});
}
});
}
@ -1150,7 +1150,7 @@ function runThePopup() {
}
function hideDiscordButton() {
chrome.storage.sync.set({"hideDiscordLink": false});
chrome.storage.sync.set({"hideDiscordLink": true});
SB.discordButtonContainer.style.display = "none";
}