mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-11 22:17:21 +03:00
Add animation to segment hiding
This commit is contained in:
@@ -486,6 +486,9 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
|
|||||||
hideButton.src = chrome.runtime.getURL("icons/visible.svg");
|
hideButton.src = chrome.runtime.getURL("icons/visible.svg");
|
||||||
}
|
}
|
||||||
hideButton.addEventListener("click", () => {
|
hideButton.addEventListener("click", () => {
|
||||||
|
const stopAnimation = AnimationUtils.applyLoadingAnimation(hideButton, 0.4);
|
||||||
|
stopAnimation();
|
||||||
|
|
||||||
if (segmentTimes[i].hidden === SponsorHideType.Hidden) {
|
if (segmentTimes[i].hidden === SponsorHideType.Hidden) {
|
||||||
hideButton.src = chrome.runtime.getURL("icons/visible.svg");
|
hideButton.src = chrome.runtime.getURL("icons/visible.svg");
|
||||||
segmentTimes[i].hidden = SponsorHideType.Visible;
|
segmentTimes[i].hidden = SponsorHideType.Visible;
|
||||||
|
|||||||
Reference in New Issue
Block a user