This commit is contained in:
MLH
2024-11-25 01:48:56 +01:00
parent 57523921a2
commit b689d8ddc9

View File

@@ -76,8 +76,8 @@ function addRandomSnowflakes(count) {
// initialize snowflakes and add random snowflakes after the DOM is loaded
document.addEventListener('DOMContentLoaded', () => {
toggleSnowflakes();
const screenWidth = window.innerWidth;
const screenWidth = window.innerWidth; // get the screen width to detect mobile devices
if (randomSnowflakes && screenWidth > 768) { // add random snowflakes only on larger screens
addRandomSnowflakes(snowflakeCount);
}