Refactor halloween.js and marioday.js to enhance clarity and maintainability of configuration handling [skip ci]
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user