Made options a hidden section in the popup.

This commit is contained in:
Ajay Ramachandran
2019-07-12 19:11:09 -04:00
parent 6af1f11a6f
commit 598e15203b
3 changed files with 29 additions and 12 deletions

View File

@@ -34,7 +34,7 @@ body {
top:1px;
}
.noticeButton {
.dangerButton {
-moz-box-shadow:inset 0px 1px 0px 0px #cf866c;
-webkit-box-shadow:inset 0px 1px 0px 0px #cf866c;
box-shadow:inset 0px 1px 0px 0px #cf866c;
@@ -51,10 +51,10 @@ body {
text-decoration:none;
text-shadow:0px 1px 0px #854629;
}
.noticeButton:hover {
.dangerButton:hover {
background-color:#bc3315;
}
.noticeButton:active {
.dangerButton:active {
position:relative;
top:1px;
}

View File

@@ -52,16 +52,26 @@
<button id="submitTimes" style="display: none" class="smallButton">Submit Times</button>
</div>
<br/>
<br/>
<button id="hideVideoPlayerControls" class="warningButton">Hide Button On YouTube Player</button>
<button id="showVideoPlayerControls" style="display: none" class="warningButton">Show Button On YouTube Player</button>
<br/>
<br/>
<div id="optionsButtonContainer">
<br/>
<br/>
<button id="showNoticeAgain" style="display: none" class="noticeButton">Show Notice Again</button>
<button id="optionsButton" class="dangerButton">Options</button>
</div>
<div id="options" style="display: none">
<br/>
<h3>Options</h3>
<button id="hideVideoPlayerControls" class="warningButton">Hide Button On YouTube Player</button>
<button id="showVideoPlayerControls" style="display: none" class="warningButton">Show Button On YouTube Player</button>
<br/>
<br/>
<button id="showNoticeAgain" style="display: none" class="dangerButton">Show Notice Again</button>
</div>
</div>
</div>
</center>

View File

@@ -5,6 +5,7 @@ document.getElementById("submitTimes").addEventListener("click", submitTimes);
document.getElementById("showNoticeAgain").addEventListener("click", showNoticeAgain);
document.getElementById("hideVideoPlayerControls").addEventListener("click", hideVideoPlayerControls);
document.getElementById("showVideoPlayerControls").addEventListener("click", showVideoPlayerControls);
document.getElementById("optionsButton").addEventListener("click", openOptions);
//if true, the button now selects the end time
var startTimeChosen = false;
@@ -301,6 +302,12 @@ function showSubmitTimesIfNecessary() {
}
}
//make the options div visisble
function openOptions() {
document.getElementById("optionsButtonContainer").style.display = "none";
document.getElementById("options").style.display = "unset";
}
//this is not a YouTube video page
function displayNoVideo() {
document.getElementById("loadingIndicator").innerHTML = "This probably isn't a YouTube tab, or you clicked too early. " +