option to enable/disable
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
const snowflakes = true; // enable/disable snowflakes
|
||||
const randomSnowflakes = true; // enable random Snowflakes
|
||||
const snowflakeCount = 25; // count of random extra snowflakes
|
||||
|
||||
@@ -75,6 +76,7 @@ function addRandomSnowflakes(count) {
|
||||
|
||||
// initialize snowflakes and add random snowflakes after the DOM is loaded
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
if (!snowflakes) return; // exit if snowflakes are disabled
|
||||
toggleSnowflakes();
|
||||
|
||||
const screenWidth = window.innerWidth; // get the screen width to detect mobile devices
|
||||
|
Reference in New Issue
Block a user