feat: Bump version to 1.1.0.0 and add advanced configuration options for seasonal effects

Enhanced JavaScript files for autumn, christmas, easter, fireworks, halloween, hearts, santa, snowfall, snowflakes, and snowstorm to support configuration options via window.SeasonalsPluginConfig.

Added automatic theme selection based on date in README.md.
This commit is contained in:
CodeDevMLH
2025-12-16 01:26:27 +01:00
parent 893794aabc
commit 25a0be221b
22 changed files with 762 additions and 78 deletions

View File

@@ -1,9 +1,11 @@
const leaves = true; // enable/disable leaves
const randomLeaves = true; // enable random leaves
const randomLeavesMobile = false; // enable random leaves on mobile devices
const enableDiffrentDuration = true; // enable different duration for the random leaves
const enableRotation = false; // enable/disable leaf rotation
const leafCount = 25; // count of random extra leaves
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
let msgPrinted = false; // flag to prevent multiple console messages

View File

@@ -1,8 +1,10 @@
const christmas = true; // enable/disable christmas
const randomChristmas = true; // enable random Christmas
const randomChristmasMobile = false; // enable random Christmas on mobile devices
const enableDiffrentDuration = true; // enable different duration for the random Christmas symbols
const christmasCount = 25; // count of random extra 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
let msgPrinted = false; // flag to prevent multiple console messages

View File

@@ -1,14 +1,16 @@
const easter = true; // enable/disable easter
const randomEaster = true; // enable random easter
const randomEasterMobile = false; // enable random easter on mobile devices
const enableDiffrentDuration = true; // enable different duration for the random easter
const easterEggCount = 20; // count of random extra easter
const config = window.SeasonalsPluginConfig?.easter || {};
const bunny = true; // enable/disable hopping bunny
const bunnyDuration = 12000; // duration of the bunny animation in ms
const hopHeight = 12; // height of the bunny hops in px
const minBunnyRestTime = 2000; // minimum time the bunny rests in ms
const maxBunnyRestTime = 5000; // maximum time the bunny rests in ms
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
let msgPrinted = false; // flag to prevent multiple console messages

View File

@@ -1,9 +1,11 @@
const fireworks = true; // enable/disable fireworks
const scrollFireworks = true; // enable fireworks to scroll with page content
const particlesPerFirework = 50; // count of particles per firework
const minFireworks = 3; // minimum number of simultaneous fireworks
const maxFireworks = 6; // maximum number of simultaneous fireworks
const intervalOfFireworks = 3200; // interval for the fireworks in milliseconds
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
// array of color palettes for the fireworks
const colorPalettes = [

View File

@@ -1,8 +1,10 @@
const halloween = true; // enable/disable halloween
const randomSymbols = true; // enable more random symbols
const randomSymbolsMobile = false; // enable random symbols on mobile devices
const enableDiffrentDuration = true; // enable different duration for the random halloween symbols
const halloweenCount = 25; // count of random extra symbols
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
let msgPrinted = false; // flag to prevent multiple console messages

View File

@@ -1,8 +1,10 @@
const hearts = true; // enable/disable hearts
const randomSymbols = true; // enable more random symbols
const randomSymbolsMobile = false; // enable random symbols on mobile devices
const enableDiffrentDuration = true; // enable different animation duration for random symbols
const heartsCount = 25; // count of random extra symbols
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
let msgPrinted = false; // flag to prevent multiple console messages

View File

@@ -1,13 +1,15 @@
const santaIsFlying = true; // enable/disable santa
let snowflakesCount = 500; // count of snowflakes (recommended values: 300-600)
const snowflakesCountMobile = 250; // count of snowflakes on mobile devices
const snowFallSpeed = 3; // speed of snowfall (recommended values: 0-5)
const santaSpeed = 10; // speed of santa in seconds (recommended values: 5000-15000)
const santaSpeedMobile = 8; // speed of santa on mobile devices in seconds
const maxSantaRestTime = 8; // maximum time santa rests in seconds
const minSantaRestTime = 3; // minimum time santa rests in seconds
const maxPresentFallSpeed = 5; // maximum speed of falling presents in seconds
const minPresentFallSpeed = 2; // minimum speed of falling presents in seconds
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: 5000-15000)
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

@@ -161,6 +161,7 @@ async function initializeTheme() {
const config = await response.json();
automateThemeSelection = config.automateSeasonSelection;
defaultTheme = config.selectedSeason;
window.SeasonalsPluginConfig = config;
} else {
console.error('Failed to fetch Seasonals config');
}

View File

@@ -1,7 +1,9 @@
const snowfall = true; // enable/disable snowfall
let snowflakesCount = 500; // count of snowflakes (recommended values: 300-600)
const snowflakesCountMobile = 250; // count of snowflakes on mobile devices
const snowFallSpeed = 3; // speed of snowfall (recommended values: 0-5)
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)
let msgPrinted = false; // flag to prevent multiple console messages

View File

@@ -1,9 +1,11 @@
const snowflakes = true; // enable/disable snowflakes
const randomSnowflakes = true; // enable random Snowflakes
const randomSnowflakesMobile = false; // enable random Snowflakes on mobile devices
const enableColoredSnowflakes = true; // enable colored snowflakes on mobile devices
const enableDiffrentDuration = true; // enable different animation duration for random symbols
const snowflakeCount = 25; // count of random extra 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
let msgPrinted = false; // flag to prevent multiple console messages

View File

@@ -1,9 +1,11 @@
const snowstorm = true; // enable/disable snowstorm
let snowflakesCount = 500; // count of snowflakes (recommended values: 300-600)
const snowflakesCountMobile = 250; // count of snowflakes on mobile devices
const snowFallSpeed = 6; // speed of snowfall (recommended values: 4-8)
const horizontalWind = 4; // horizontal wind speed (recommended value: 4)
const verticalVariation = 2; // vertical variation (recommended value: 2)
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)
let msgPrinted = false; // flag to prevent multiple console messages