extra snowflakes only on non mobile screens
This commit is contained in:
@ -76,7 +76,9 @@ function addRandomSnowflakes(count) {
|
||||
// initialize snowflakes and add random snowflakes after the DOM is loaded
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
toggleSnowflakes();
|
||||
if (randomSnowflakes) {
|
||||
const screenWidth = window.innerWidth;
|
||||
|
||||
if (randomSnowflakes && screenWidth > 768) { // add random snowflakes only on larger screens
|
||||
addRandomSnowflakes(snowflakeCount);
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user