mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-27 01:48:48 +03:00
Made options a hidden section in the popup.
This commit is contained in:
@@ -34,7 +34,7 @@ body {
|
|||||||
top:1px;
|
top:1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noticeButton {
|
.dangerButton {
|
||||||
-moz-box-shadow:inset 0px 1px 0px 0px #cf866c;
|
-moz-box-shadow:inset 0px 1px 0px 0px #cf866c;
|
||||||
-webkit-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;
|
box-shadow:inset 0px 1px 0px 0px #cf866c;
|
||||||
@@ -51,10 +51,10 @@ body {
|
|||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
text-shadow:0px 1px 0px #854629;
|
text-shadow:0px 1px 0px #854629;
|
||||||
}
|
}
|
||||||
.noticeButton:hover {
|
.dangerButton:hover {
|
||||||
background-color:#bc3315;
|
background-color:#bc3315;
|
||||||
}
|
}
|
||||||
.noticeButton:active {
|
.dangerButton:active {
|
||||||
position:relative;
|
position:relative;
|
||||||
top:1px;
|
top:1px;
|
||||||
}
|
}
|
||||||
|
|||||||
28
popup.html
28
popup.html
@@ -52,16 +52,26 @@
|
|||||||
<button id="submitTimes" style="display: none" class="smallButton">Submit Times</button>
|
<button id="submitTimes" style="display: none" class="smallButton">Submit Times</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br/>
|
<div id="optionsButtonContainer">
|
||||||
<br/>
|
<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/>
|
|
||||||
|
|
||||||
<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>
|
||||||
</div>
|
</div>
|
||||||
</center>
|
</center>
|
||||||
|
|||||||
7
popup.js
7
popup.js
@@ -5,6 +5,7 @@ document.getElementById("submitTimes").addEventListener("click", submitTimes);
|
|||||||
document.getElementById("showNoticeAgain").addEventListener("click", showNoticeAgain);
|
document.getElementById("showNoticeAgain").addEventListener("click", showNoticeAgain);
|
||||||
document.getElementById("hideVideoPlayerControls").addEventListener("click", hideVideoPlayerControls);
|
document.getElementById("hideVideoPlayerControls").addEventListener("click", hideVideoPlayerControls);
|
||||||
document.getElementById("showVideoPlayerControls").addEventListener("click", showVideoPlayerControls);
|
document.getElementById("showVideoPlayerControls").addEventListener("click", showVideoPlayerControls);
|
||||||
|
document.getElementById("optionsButton").addEventListener("click", openOptions);
|
||||||
|
|
||||||
//if true, the button now selects the end time
|
//if true, the button now selects the end time
|
||||||
var startTimeChosen = false;
|
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
|
//this is not a YouTube video page
|
||||||
function displayNoVideo() {
|
function displayNoVideo() {
|
||||||
document.getElementById("loadingIndicator").innerHTML = "This probably isn't a YouTube tab, or you clicked too early. " +
|
document.getElementById("loadingIndicator").innerHTML = "This probably isn't a YouTube tab, or you clicked too early. " +
|
||||||
|
|||||||
Reference in New Issue
Block a user