summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content/script.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/content/script.js b/content/script.js
index 7143b25..df5a9c0 100644
--- a/content/script.js
+++ b/content/script.js
@@ -1,4 +1,14 @@
1let i = 0;
2
1function createSnowFlake() { 3function createSnowFlake() {
4 const threshold = -10 * Math.log10(window.innerWidth / 1000);
5
6 if (++i < threshold) {
7 return;
8 }
9
10 i = 0;
11
2 const snowFlake = document.createElementNS("http://www.w3.org/2000/svg", "svg"); 12 const snowFlake = document.createElementNS("http://www.w3.org/2000/svg", "svg");
3 const snowFlakeInner = document.createElementNS("http://www.w3.org/2000/svg", "use"); 13 const snowFlakeInner = document.createElementNS("http://www.w3.org/2000/svg", "use");
4 14