..
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user