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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user