mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 20:17:05 +03:00
Added fade out animation
This commit is contained in:
@@ -58,6 +58,11 @@
|
|||||||
to { opacity: 1; }
|
to { opacity: 1; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@keyframes fadeOut {
|
||||||
|
from { opacity: 1; }
|
||||||
|
to { opacity: 0; }
|
||||||
|
}
|
||||||
|
|
||||||
.sponsorBlockSpacer {
|
.sponsorBlockSpacer {
|
||||||
background-color: rgb(100, 100, 100);
|
background-color: rgb(100, 100, 100);
|
||||||
border-color: rgb(100, 100, 100);
|
border-color: rgb(100, 100, 100);
|
||||||
@@ -82,6 +87,10 @@
|
|||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sponsorBlockFadeOutAnimiation {
|
||||||
|
animation: fadeOut 3s;
|
||||||
|
}
|
||||||
|
|
||||||
.sponsorSkipNoticeTimeLeft {
|
.sponsorSkipNoticeTimeLeft {
|
||||||
color: #eeeeee;
|
color: #eeeeee;
|
||||||
|
|
||||||
|
|||||||
@@ -174,6 +174,13 @@ class SkipNotice {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.countdownTime == 3) {
|
||||||
|
//start fade out animation
|
||||||
|
let notice = document.getElementById("sponsorSkipNotice" + this.UUID);
|
||||||
|
notice.style.removeProperty("animation");
|
||||||
|
notice.classList.add("sponsorBlockFadeOutAnimiation");
|
||||||
|
}
|
||||||
|
|
||||||
this.updateTimerDisplay();
|
this.updateTimerDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -188,6 +195,11 @@ class SkipNotice {
|
|||||||
//inform the user
|
//inform the user
|
||||||
let timeLeft = document.getElementById("sponsorSkipNoticeTimeLeft" + this.UUID);
|
let timeLeft = document.getElementById("sponsorSkipNoticeTimeLeft" + this.UUID);
|
||||||
timeLeft.innerText = chrome.i18n.getMessage("paused");
|
timeLeft.innerText = chrome.i18n.getMessage("paused");
|
||||||
|
|
||||||
|
//remove the fade out class if it exists
|
||||||
|
let notice = document.getElementById("sponsorSkipNotice" + this.UUID);
|
||||||
|
notice.classList.remove("sponsorBlockFadeOutAnimiation");
|
||||||
|
notice.style.animation = "none";
|
||||||
}
|
}
|
||||||
|
|
||||||
startCountdown() {
|
startCountdown() {
|
||||||
|
|||||||
Reference in New Issue
Block a user