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,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