Added a hidden "Animation Speed" setting (defaults to 0.1s)

This commit is contained in:
nuttylmao
2025-05-06 21:06:43 +10:00
parent 695c136500
commit ffd19e148b
2 changed files with 8 additions and 3 deletions
+5
View File
@@ -56,6 +56,8 @@ const showFourthwallAlerts = GetBooleanParam("showFourthwallAlerts", true);
const furryMode = GetBooleanParam("furryMode", false); const furryMode = GetBooleanParam("furryMode", false);
const animationSpeed = GetIntParam("animationSpeed", 0.1);
// Set fonts for the widget // Set fonts for the widget
document.body.style.fontFamily = font; document.body.style.fontFamily = font;
document.body.style.fontSize = `${fontSize}px`; document.body.style.fontSize = `${fontSize}px`;
@@ -84,6 +86,9 @@ switch (scrollDirection) {
break; break;
} }
// Set the animation speed
document.documentElement.style.setProperty('--animation-speed', `${animationSpeed}s`);
+3 -3
View File
@@ -73,12 +73,12 @@ li {
} }
.slide-fade li { .slide-fade li {
transition: all 0.5s ease-out; transition: all var(--animation-speed) ease-out;
opacity: 0; /* opacity: 0; */
} }
.slide-fade li.show { .slide-fade li.show {
opacity: 1; /* opacity: 1; */
} }
#IPutThisHereSoICanCalculateHowBigEachMessageIsSupposedToBeBeforeIAddItToTheMessageList { #IPutThisHereSoICanCalculateHowBigEachMessageIsSupposedToBeBeforeIAddItToTheMessageList {