From bcee1a0f4615d90bd714adf8bea79baffe006579 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Wed, 29 Dec 2021 19:16:35 +0100 Subject: Added lightbox --- content/script.js | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 content/script.js (limited to 'content/script.js') diff --git a/content/script.js b/content/script.js deleted file mode 100644 index fd275b6..0000000 --- a/content/script.js +++ /dev/null @@ -1,28 +0,0 @@ -function createSnowFlake() { - setTimeout(() => createSnowFlake(), 50 / Math.log10(window.innerWidth / 1000 + 1)); - - if (document.hidden) { - return; - } - - const snowFlake = document.createElementNS("http://www.w3.org/2000/svg", "svg"); - const snowFlakeInner = document.createElementNS("http://www.w3.org/2000/svg", "use"); - const aniDuration = (Math.random() * 3 + 2) * 1000; - - snowFlakeInner.setAttribute("href", "/symbols.svg#icon-asterisk"); - - snowFlake.classList.add("o-icon", "o-icon--snow"); - snowFlake.setAttribute("aria-hidden", "true"); - - snowFlake.style.fontSize = Math.random() * 0.5 + 0.7 + 'em'; - snowFlake.style.left = Math.random() * 100 + '%'; - snowFlake.style.animationDuration = aniDuration + 'ms'; - snowFlake.style.opacity = Math.random(); - - setTimeout(() => snowFlake.remove(), aniDuration); - - snowFlake.appendChild(snowFlakeInner); - document.body.appendChild(snowFlake); -} - -createSnowFlake(); -- cgit v1.2.3-70-g09d2