Added border to notice and increased timeout more, also added a notice about the timeout.

This commit is contained in:
Ajay Ramachandran
2019-07-11 18:47:03 -04:00
parent 9abec6bcba
commit 7ea2c2b974
2 changed files with 20 additions and 7 deletions

View File

@@ -12,11 +12,12 @@
}
#sponsorSkipNotice {
min-height: 120px;
min-height: 125px;
min-width: 400px;
background-color: rgba(255, 217, 217, 0.8);
position: absolute;
z-index: 1;
z-index: 1;
border: 3px solid rgba(0, 0, 0, 0.8);
}
#sponsorSkipMessage {
@@ -24,7 +25,13 @@
color: #000000;
text-align: center;
margin-top: 10px;
font-weight: bold;
font-weight: bold;
}
#sponsorSkipInfo {
font-size: 10px;
color: #000000;
text-align: center;
}
.sponsorSkipButton {

View File

@@ -108,7 +108,7 @@ function sponsorCheck(sponsorTimes) { // Video skipping
//send out the message saying that a sponsor message was skipped
openSkipNotice();
setTimeout(closeSkipNotice, 5000);
setTimeout(closeSkipNotice, 7000);
}
lastTime = v.currentTime;
@@ -139,10 +139,15 @@ function openSkipNotice(){
logoElement.id = "sponsorSkipLogo";
logoElement.src = chrome.extension.getURL("icons/LogoSponsorBlocker256px.png");
var noticeMessage = document.createElement("p");
var noticeMessage = document.createElement("div");
noticeMessage.id = "sponsorSkipMessage";
noticeMessage.className = "sponsorSkipObject";
noticeMessage.innerText = "Hey, you just skipped a sponsor!";
noticeMessage.innerText = "Hey, you just skipped a sponsor!";
var noticeInfo = document.createElement("p");
noticeInfo.id = "sponsorSkipInfo";
noticeInfo.className = "sponsorSkipObject";
noticeInfo.innerText = "This message will disapear in 7 seconds";
var buttonContainer = document.createElement("div");
buttonContainer.setAttribute("align", "center");
@@ -154,7 +159,7 @@ function openSkipNotice(){
goBackButton.addEventListener("click", goBackToPreviousTime);
var hideButton = document.createElement("button");
hideButton.innerText = "Hide";
hideButton.innerText = "Dismiss";
hideButton.className = "sponsorSkipObject";
hideButton.className = "sponsorSkipButton";
hideButton.addEventListener("click", closeSkipNotice);
@@ -173,6 +178,7 @@ function openSkipNotice(){
noticeElement.appendChild(logoElement);
noticeElement.appendChild(noticeMessage);
noticeElement.appendChild(noticeInfo);
noticeElement.appendChild(buttonContainer);
var referenceNode = document.getElementById("info");