From 598e15203bbd4eb8d67787ba8f353244670cf0c8 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Fri, 12 Jul 2019 19:11:09 -0400 Subject: [PATCH] Made options a hidden section in the popup. --- popup.css | 6 +++--- popup.html | 28 +++++++++++++++++++--------- popup.js | 7 +++++++ 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/popup.css b/popup.css index f2e46593..9c59f74f 100644 --- a/popup.css +++ b/popup.css @@ -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; } diff --git a/popup.html b/popup.html index e078278d..79b7adde 100644 --- a/popup.html +++ b/popup.html @@ -52,16 +52,26 @@ -
-
- - - - -
-
+
+
+
- + +
+ + diff --git a/popup.js b/popup.js index 052207a9..d5b984f0 100644 --- a/popup.js +++ b/popup.js @@ -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. " +