Sfoglia il codice sorgente

randomly show gb cam avatar on index

Thomas B 2 mesi fa
parent
commit
29b2786304
2 ha cambiato i file con 14 aggiunte e 0 eliminazioni
  1. 14
    0
      input/index.md
  2. BIN
      static/img/gb_cam.png

+ 14
- 0
input/index.md Vedi File

@@ -22,3 +22,17 @@ printRecentMenu(10)
22 22
 %-->
23 23
 
24 24
 [Show all updates](updates.html).
25
+
26
+<script>
27
+    function getRandomInt(max) {
28
+        return Math.floor(Math.random() * max);
29
+    }
30
+    var img = document.getElementById("index-avatar");
31
+    if (getRandomInt(2) == 0) {
32
+        setTimeout(function() {
33
+            img.src = "img/gb_cam.png";
34
+            img.style.width = "150px"; // 128*1.17188
35
+            img.style.height = "131px"; // 112*1.17188
36
+        }, 500 + getRandomInt(10000));
37
+    }
38
+</script>

BIN
static/img/gb_cam.png Vedi File


Loading…
Annulla
Salva