Différences entre versions de « MediaWiki:Common.js »
Sauter à la navigation
Sauter à la recherche
m |
m |
||
| Ligne 1 : | Ligne 1 : | ||
| − | |||
| − | |||
document.addEventListener('DOMContentLoaded', function () { | document.addEventListener('DOMContentLoaded', function () { | ||
console.log('hello'); | console.log('hello'); | ||
Version du 21 janvier 2024 à 16:13
document.addEventListener('DOMContentLoaded', function () {
console.log('hello');
const snowflakes = ["❄", "❅", "❆"];
function createSnowflake() {
const snowflake = document.createElement('div');
snowflake.className = 'snowflake';
snowflake.innerHTML = snowflakes[Math.floor(Math.random() * snowflakes.length)];
snowflake.style.left = Math.random() * window.innerWidth + 'px';
snowflake.style.animationDuration = Math.random() * 3 + 2 + 's';
document.body.appendChild(snowflake);
setTimeout(() => {
document.body.removeChild(snowflake);
}, 5000);
}
function generateSnowflakes() {
setInterval(createSnowflake, 500); // Create a new snowflake every 500 milliseconds
}
generateSnowflakes();
});