Compare commits

...

2 Commits

3 changed files with 19 additions and 24 deletions

View File

@@ -1,11 +1,10 @@
const config = window.SeasonalsPluginConfig?.Birthday || {};
const birthday = config.EnableBirthday !== undefined ? config.EnableBirthday : true;
const symbolCount = config.SymbolCount || 5;
const useRandomSymbols = config.EnableRandomSymbols !== undefined ? config.EnableRandomSymbols : true;
const enableRandomMobile = config.EnableRandomSymbolsMobile !== undefined ? config.EnableRandomSymbolsMobile : false;
const enableDifferentDuration = config.EnableDifferentDuration !== undefined ? config.EnableDifferentDuration : true;
const birthday = config.EnableBirthday !== undefined ? config.EnableBirthday : true; // enable/disable birthday symbols
const symbolCount = config.SymbolCount !== undefined ? config.SymbolCount : 15; // count of balloons
const enableDifferentDuration = config.EnableDifferentDuration !== undefined ? config.EnableDifferentDuration : true; // enable different duration for the symbols
const symbolCountMobile = config.SymbolCountMobile !== undefined ? config.SymbolCountMobile : 5; // count of mobile balloons
const baseConfettiCount = config.ConfettiCount !== undefined ? config.ConfettiCount : 60; // count of confetti
const birthdayImages = [
'../Seasonals/Resources/birthday_assets/balloon_blue.gif',
@@ -142,15 +141,8 @@ function createBirthday() {
// Cake and Garland have been removed
const standardCount = 15;
const totalSymbols = symbolCount + standardCount;
let isMobile = window.matchMedia("only screen and (max-width: 768px)").matches;
let finalCount = totalSymbols;
if (isMobile) {
finalCount = enableRandomMobile ? totalSymbols : standardCount;
}
let finalCount = isMobile ? symbolCountMobile : symbolCount;
const useRandomDuration = enableDifferentDuration !== false;
@@ -254,8 +246,7 @@ function createBirthday() {
}
// Party Confetti
const baseConfettiCount = config.ConfettiCount !== undefined ? config.ConfettiCount : 60;
const confettiCount = isMobile ? Math.floor(baseConfettiCount / 2) : baseConfettiCount;
const confettiCount = baseConfettiCount;
const allColors = ['#e6194b', '#3cb44b', '#ffe119', '#4363d8', '#f58231', '#911eb4', '#46f0f0', '#f032e6', '#bcf60c', '#fabebe', '#008080', '#e6beff', '#9a6324', '#fffac8', '#800000', '#aaffc3', '#808000', '#ffd8b1', '#000075', '#808080', '#ffffff', '#000000'];
for (let i = 0; i < confettiCount; i++) {

View File

@@ -1,12 +1,12 @@
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 enableSpiders = config.EnableSpiders !== undefined ? config.EnableSpiders : true;
const enableMice = config.EnableMice !== undefined ? config.EnableMice : true;
const halloweenCount = config.SymbolCount || 25; // count of random extra symbols
const randomSymbols = config.EnableRandomSymbols !== undefined ? config.EnableRandomSymbols : true; // enable random symbols
const randomSymbolsMobile = config.EnableRandomSymbolsMobile !== undefined ? config.EnableRandomSymbolsMobile : false; // enable random symbols on mobile
const enableDiffrentDuration = config.EnableDifferentDuration !== undefined ? config.EnableDifferentDuration : true; // enable different durations
const enableSpiders = config.EnableSpiders !== undefined ? config.EnableSpiders : true; // enable/disable spiders
const enableMice = config.EnableMice !== undefined ? config.EnableMice : true; // enable/disable mice
const halloweenCount = config.SymbolCount !== undefined ? config.SymbolCount : 25; // count of symbols
const images = [
"../Seasonals/Resources/halloween_images/ghost_20x20.png",

View File

@@ -1,5 +1,9 @@
const config = window.SeasonalsPluginConfig?.MarioDay || {};
const marioday = config.EnableMarioDay !== undefined ? config.EnableMarioDay : true;
const marioday = config.EnableMarioDay !== undefined ? config.EnableMarioDay : true; // enable/disable marioday
const letMarioJump = config.LetMarioJump !== undefined ? config.LetMarioJump : true; // optionally let mario jump occasionally
// Credit: https://gifs.alphacoders.com/gifs/view/2585
const marioImage = '../Seasonals/Resources/mario_assets/mario.gif';
let msgPrinted = false;
@@ -45,7 +49,7 @@ function createMarioDay(container) {
const mario = document.createElement('img');
mario.className = 'mario-runner';
mario.src = '../Seasonals/Resources/mario_assets/mario.gif';
mario.src = marioImage;
wrapper.appendChild(mario);
container.appendChild(wrapper);