feat: update configuration keys to use PascalCase for consistency across seasonal scripts

This commit is contained in:
CodeDevMLH
2025-12-18 00:01:19 +01:00
parent d73b1d17ff
commit 176aa97c1c
12 changed files with 74 additions and 75 deletions

View File

@@ -1,11 +1,11 @@
const config = window.SeasonalsPluginConfig?.autumn || {};
const config = window.SeasonalsPluginConfig?.Autumn || {};
const leaves = config.enableAutumn !== undefined ? config.enableAutumn : true; // enable/disable leaves
const randomLeaves = config.enableRandomLeaves !== undefined ? config.enableRandomLeaves : true; // enable random leaves
const randomLeavesMobile = config.enableRandomLeavesMobile !== undefined ? config.enableRandomLeavesMobile : false; // enable random leaves on mobile devices (Warning: High values may affect performance)
const enableDiffrentDuration = config.enableDifferentDuration !== undefined ? config.enableDifferentDuration : true; // enable different duration for the random leaves
const enableRotation = config.enableRotation !== undefined ? config.enableRotation : false; // enable/disable leaf rotation
const leafCount = config.leafCount || 25; // count of random extra leaves
const leaves = config.EnableAutumn !== undefined ? config.EnableAutumn : true; // enable/disable leaves
const randomLeaves = config.EnableRandomLeaves !== undefined ? config.EnableRandomLeaves : true; // enable random leaves
const randomLeavesMobile = config.EnableRandomLeavesMobile !== undefined ? config.EnableRandomLeavesMobile : false; // enable random leaves on mobile devices (Warning: High values may affect performance)
const enableDiffrentDuration = config.EnableDifferentDuration !== undefined ? config.EnableDifferentDuration : true; // enable different duration for the random leaves
const enableRotation = config.EnableRotation !== undefined ? config.EnableRotation : false; // enable/disable leaf rotation
const leafCount = config.LeafCount || 25; // count of random extra leaves
let msgPrinted = false; // flag to prevent multiple console messages

View File

@@ -1,10 +1,10 @@
const config = window.SeasonalsPluginConfig?.christmas || {};
const config = window.SeasonalsPluginConfig?.Christmas || {};
const christmas = config.enableChristmas !== undefined ? config.enableChristmas : true; // enable/disable christmas
const randomChristmas = config.enableRandomChristmas !== undefined ? config.enableRandomChristmas : true; // enable random Christmas
const randomChristmasMobile = config.enableRandomChristmasMobile !== undefined ? config.enableRandomChristmasMobile : false; // enable random Christmas on mobile devices (Warning: High values may affect performance)
const enableDiffrentDuration = config.enableDifferentDuration !== undefined ? config.enableDifferentDuration : true; // enable different duration for the random Christmas symbols
const christmasCount = config.symbolCount || 25; // count of random extra christmas
const christmas = config.EnableChristmas !== undefined ? config.EnableChristmas : true; // enable/disable christmas
const randomChristmas = config.EnableRandomChristmas !== undefined ? config.EnableRandomChristmas : true; // enable random Christmas
const randomChristmasMobile = config.EnableRandomChristmasMobile !== undefined ? config.EnableRandomChristmasMobile : false; // enable random Christmas on mobile devices (Warning: High values may affect performance)
const enableDiffrentDuration = config.EnableDifferentDuration !== undefined ? config.EnableDifferentDuration : true; // enable different duration for the random Christmas symbols
const christmasCount = config.SymbolCount || 25; // count of random extra christmas
let msgPrinted = false; // flag to prevent multiple console messages

View File

@@ -1,16 +1,16 @@
const config = window.SeasonalsPluginConfig?.easter || {};
const config = window.SeasonalsPluginConfig?.Easter || {};
const easter = config.enableEaster !== undefined ? config.enableEaster : true; // enable/disable easter
const randomEaster = config.enableRandomEaster !== undefined ? config.enableRandomEaster : true; // enable random easter
const randomEasterMobile = config.enableRandomEasterMobile !== undefined ? config.enableRandomEasterMobile : false; // enable random easter on mobile devices (Warning: High values may affect performance)
const enableDiffrentDuration = config.enableDifferentDuration !== undefined ? config.enableDifferentDuration : true; // enable different duration for the random easter
const easterEggCount = config.eggCount || 20; // count of random extra easter
const easter = config.EnableEaster !== undefined ? config.EnableEaster : true; // enable/disable easter
const randomEaster = config.EnableRandomEaster !== undefined ? config.EnableRandomEaster : true; // enable random easter
const randomEasterMobile = config.EnableRandomEasterMobile !== undefined ? config.EnableRandomEasterMobile : false; // enable random easter on mobile devices (Warning: High values may affect performance)
const enableDiffrentDuration = config.EnableDifferentDuration !== undefined ? config.EnableDifferentDuration : true; // enable different duration for the random easter
const easterEggCount = config.EggCount || 20; // count of random extra easter
const bunny = config.enableBunny !== undefined ? config.enableBunny : true; // enable/disable hopping bunny
const bunnyDuration = config.bunnyDuration || 12000; // duration of the bunny animation in ms
const hopHeight = config.hopHeight || 12; // height of the bunny hops in px
const minBunnyRestTime = config.minBunnyRestTime || 2000; // minimum time the bunny rests in ms
const maxBunnyRestTime = config.maxBunnyRestTime || 5000; // maximum time the bunny rests in ms
const bunny = config.EnableBunny !== undefined ? config.EnableBunny : true; // enable/disable hopping bunny
const bunnyDuration = config.BunnyDuration || 12000; // duration of the bunny animation in ms
const hopHeight = config.HopHeight || 12; // height of the bunny hops in px
const minBunnyRestTime = config.MinBunnyRestTime || 2000; // minimum time the bunny rests in ms
const maxBunnyRestTime = config.MaxBunnyRestTime || 5000; // maximum time the bunny rests in ms
let msgPrinted = false; // flag to prevent multiple console messages

View File

@@ -1,11 +1,11 @@
const config = window.SeasonalsPluginConfig?.fireworks || {};
const config = window.SeasonalsPluginConfig?.Fireworks || {};
const fireworks = config.enableFireworks !== undefined ? config.enableFireworks : true; // enable/disable fireworks
const scrollFireworks = config.scrollFireworks !== undefined ? config.scrollFireworks : true; // enable fireworks to scroll with page content
const particlesPerFirework = config.particleCount || 50; // count of particles per firework (Warning: High values may affect performance)
const minFireworks = config.minFireworks || 3; // minimum number of simultaneous fireworks
const maxFireworks = config.maxFireworks || 6; // maximum number of simultaneous fireworks
const intervalOfFireworks = config.launchInterval || 3200; // interval for the fireworks in milliseconds
const fireworks = config.EnableFireworks !== undefined ? config.EnableFireworks : true; // enable/disable fireworks
const scrollFireworks = config.ScrollFireworks !== undefined ? config.ScrollFireworks : true; // enable fireworks to scroll with page content
const particlesPerFirework = config.ParticleCount || 50; // count of particles per firework (Warning: High values may affect performance)
const minFireworks = config.MinFireworks || 3; // minimum number of simultaneous fireworks
const maxFireworks = config.MaxFireworks || 6; // maximum number of simultaneous fireworks
const intervalOfFireworks = config.LaunchInterval || 3200; // interval for the fireworks in milliseconds
// array of color palettes for the fireworks
const colorPalettes = [

View File

@@ -1,10 +1,10 @@
const config = window.SeasonalsPluginConfig?.halloween || {};
const config = window.SeasonalsPluginConfig?.Halloween || {};
const halloween = config.enableHalloween !== undefined ? config.enableHalloween : true; // enable/disable halloween
const randomSymbols = config.enableRandomSymbols !== undefined ? config.enableRandomSymbols : true; // enable more random symbols
const randomSymbolsMobile = config.enableRandomSymbolsMobile !== undefined ? config.enableRandomSymbolsMobile : false; // enable random symbols on mobile devices (Warning: High values may affect performance)
const enableDiffrentDuration = config.enableDifferentDuration !== undefined ? config.enableDifferentDuration : true; // enable different duration for the random halloween symbols
const halloweenCount = config.symbolCount || 25; // count of random extra symbols
const halloween = config.EnableHalloween !== undefined ? config.EnableHalloween : true; // enable/disable halloween
const randomSymbols = config.EnableRandomSymbols !== undefined ? config.EnableRandomSymbols : true; // enable more random symbols
const randomSymbolsMobile = config.EnableRandomSymbolsMobile !== undefined ? config.EnableRandomSymbolsMobile : false; // enable random symbols on mobile devices (Warning: High values may affect performance)
const enableDiffrentDuration = config.EnableDifferentDuration !== undefined ? config.EnableDifferentDuration : true; // enable different duration for the random halloween symbols
const halloweenCount = config.SymbolCount || 25; // count of random extra symbols
let msgPrinted = false; // flag to prevent multiple console messages

View File

@@ -1,10 +1,10 @@
const config = window.SeasonalsPluginConfig?.hearts || {};
const config = window.SeasonalsPluginConfig?.Hearts || {};
const hearts = config.enableHearts !== undefined ? config.enableHearts : true; // enable/disable hearts
const randomSymbols = config.enableRandomSymbols !== undefined ? config.enableRandomSymbols : true; // enable more random symbols
const randomSymbolsMobile = config.enableRandomSymbolsMobile !== undefined ? config.enableRandomSymbolsMobile : false; // enable random symbols on mobile devices (Warning: High values may affect performance)
const enableDiffrentDuration = config.enableDifferentDuration !== undefined ? config.enableDifferentDuration : true; // enable different animation duration for random symbols
const heartsCount = config.symbolCount || 25; // count of random extra symbols
const hearts = config.EnableHearts !== undefined ? config.EnableHearts : true; // enable/disable hearts
const randomSymbols = config.EnableRandomSymbols !== undefined ? config.EnableRandomSymbols : true; // enable more random symbols
const randomSymbolsMobile = config.EnableRandomSymbolsMobile !== undefined ? config.EnableRandomSymbolsMobile : false; // enable random symbols on mobile devices (Warning: High values may affect performance)
const enableDiffrentDuration = config.EnableDifferentDuration !== undefined ? config.EnableDifferentDuration : true; // enable different animation duration for random symbols
const heartsCount = config.SymbolCount || 25; // count of random extra symbols
let msgPrinted = false; // flag to prevent multiple console messages

View File

@@ -1,15 +1,15 @@
const config = window.SeasonalsPluginConfig?.santa || {};
const config = window.SeasonalsPluginConfig?.Santa || {};
const santaIsFlying = config.enableSanta !== undefined ? config.enableSanta : true; // enable/disable santa
let snowflakesCount = config.snowflakesCount || 500; // count of snowflakes (recommended values: 300-600)
const snowflakesCountMobile = config.snowflakesCountMobile || 250; // count of snowflakes on mobile devices (Warning: High values may affect performance)
const snowFallSpeed = config.snowFallSpeed || 3; // speed of snowfall (recommended values: 0-5)
const santaSpeed = config.santaSpeed || 10; // speed of santa in seconds (recommended values: 5-15)
const santaSpeedMobile = config.santaSpeedMobile || 8; // speed of santa on mobile devices in seconds
const maxSantaRestTime = config.maxSantaRestTime || 8; // maximum time santa rests in seconds
const minSantaRestTime = config.minSantaRestTime || 3; // minimum time santa rests in seconds
const maxPresentFallSpeed = config.maxPresentFallSpeed || 5; // maximum speed of falling presents in seconds
const minPresentFallSpeed = config.minPresentFallSpeed || 2; // minimum speed of falling presents in seconds
const santaIsFlying = config.EnableSanta !== undefined ? config.EnableSanta : true; // enable/disable santa
let snowflakesCount = config.SnowflakesCount || 500; // count of snowflakes (recommended values: 300-600)
const snowflakesCountMobile = config.SnowflakesCountMobile || 250; // count of snowflakes on mobile devices (Warning: High values may affect performance)
const snowFallSpeed = config.SnowFallSpeed || 3; // speed of snowfall (recommended values: 0-5)
const santaSpeed = config.SantaSpeed || 10; // speed of santa in seconds (recommended values: 5-15)
const santaSpeedMobile = config.SantaSpeedMobile || 8; // speed of santa on mobile devices in seconds
const maxSantaRestTime = config.MaxSantaRestTime || 8; // maximum time santa rests in seconds
const minSantaRestTime = config.MinSantaRestTime || 3; // minimum time santa rests in seconds
const maxPresentFallSpeed = config.MaxPresentFallSpeed || 5; // maximum speed of falling presents in seconds
const minPresentFallSpeed = config.MinPresentFallSpeed || 2; // minimum speed of falling presents in seconds
let msgPrinted = false; // flag to prevent multiple console messages
let isMobile = false; // flag to detect mobile devices

View File

@@ -159,7 +159,6 @@ async function initializeTheme() {
const response = await fetch('/Seasonals/Config');
if (response.ok) {
const config = await response.json();
// automateThemeSelection = config.automateSeasonSelection;
automateThemeSelection = config.AutomateSeasonSelection;
defaultTheme = config.SelectedSeason;
window.SeasonalsPluginConfig = config;

View File

@@ -1,9 +1,9 @@
const config = window.SeasonalsPluginConfig?.snowfall || {};
const config = window.SeasonalsPluginConfig?.Snowfall || {};
const snowfall = config.enableSnowfall !== undefined ? config.enableSnowfall : true; // enable/disable snowfall
let snowflakesCount = config.snowflakesCount || 500; // count of snowflakes (recommended values: 300-600)
const snowflakesCountMobile = config.snowflakesCountMobile || 250; // count of snowflakes on mobile devices (Warning: High values may affect performance)
const snowFallSpeed = config.speed || 3; // speed of snowfall (recommended values: 0-5)
const snowfall = config.EnableSnowfall !== undefined ? config.EnableSnowfall : true; // enable/disable snowfall
let snowflakesCount = config.SnowflakesCount || 500; // count of snowflakes (recommended values: 300-600)
const snowflakesCountMobile = config.SnowflakesCountMobile || 250; // count of snowflakes on mobile devices (Warning: High values may affect performance)
const snowFallSpeed = config.Speed || 3; // speed of snowfall (recommended values: 0-5)
let msgPrinted = false; // flag to prevent multiple console messages

View File

@@ -1,11 +1,11 @@
const config = window.SeasonalsPluginConfig?.snowflakes || {};
const config = window.SeasonalsPluginConfig?.Snowflakes || {};
const snowflakes = config.enableSnowflakes !== undefined ? config.enableSnowflakes : true; // enable/disable snowflakes
const randomSnowflakes = config.enableRandomSnowflakes !== undefined ? config.enableRandomSnowflakes : true; // enable random Snowflakes
const randomSnowflakesMobile = config.enableRandomSnowflakesMobile !== undefined ? config.enableRandomSnowflakesMobile : false; // enable random Snowflakes on mobile devices (Warning: High values may affect performance)
const enableColoredSnowflakes = config.enableColoredSnowflakes !== undefined ? config.enableColoredSnowflakes : true; // enable colored snowflakes on mobile devices
const enableDiffrentDuration = config.enableDifferentDuration !== undefined ? config.enableDifferentDuration : true; // enable different animation duration for random symbols
const snowflakeCount = config.snowflakeCount || 25; // count of random extra snowflakes
const snowflakes = config.EnableSnowflakes !== undefined ? config.EnableSnowflakes : true; // enable/disable snowflakes
const randomSnowflakes = config.EnableRandomSnowflakes !== undefined ? config.EnableRandomSnowflakes : true; // enable random Snowflakes
const randomSnowflakesMobile = config.EnableRandomSnowflakesMobile !== undefined ? config.EnableRandomSnowflakesMobile : false; // enable random Snowflakes on mobile devices
const enableColoredSnowflakes = config.EnableColoredSnowflakes !== undefined ? config.EnableColoredSnowflakes : true; // enable colored snowflakes
const enableDiffrentDuration = config.EnableDifferentDuration !== undefined ? config.EnableDifferentDuration : true; // enable different animation duration
const snowflakeCount = config.SnowflakeCount || 25; // count of random extra snowflakes
let msgPrinted = false; // flag to prevent multiple console messages

View File

@@ -1,11 +1,11 @@
const config = window.SeasonalsPluginConfig?.snowstorm || {};
const config = window.SeasonalsPluginConfig?.Snowstorm || {};
const snowstorm = config.enableSnowstorm !== undefined ? config.enableSnowstorm : true; // enable/disable snowstorm
let snowflakesCount = config.snowflakesCount || 500; // count of snowflakes (recommended values: 300-600)
const snowflakesCountMobile = config.snowflakesCountMobile || 250; // count of snowflakes on mobile devices (Warning: High values may affect performance)
const snowFallSpeed = config.speed || 6; // speed of snowfall (recommended values: 4-8)
const horizontalWind = config.horizontalWind || 4; // horizontal wind speed (recommended value: 4)
const verticalVariation = config.verticalVariation || 2; // vertical variation (recommended value: 2)
const snowstorm = config.enableSnowstorm !== undefined ? config.EnableSnowstorm : true; // enable/disable snowstorm
let snowflakesCount = config.SnowflakesCount || 500; // count of snowflakes (recommended values: 300-600)
const snowflakesCountMobile = config.SnowflakesCountMobile || 250; // count of snowflakes on mobile devices (Warning: High values may affect performance)
const snowFallSpeed = config.Speed || 6; // speed of snowfall (recommended values: 4-8)
const horizontalWind = config.HorizontalWind || 4; // horizontal wind speed (recommended value: 4)
const verticalVariation = config.VerticalVariation || 2; // vertical variation (recommended value: 2)
let msgPrinted = false; // flag to prevent multiple console messages