浏览代码

randomly show gb cam avatar on index

Thomas B 2 个月前
父节点
当前提交
29b2786304
共有 2 个文件被更改,包括 14 次插入0 次删除
  1. 14
    0
      input/index.md
  2. 二进制
      static/img/gb_cam.png

+ 14
- 0
input/index.md 查看文件

@@ -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>

二进制
static/img/gb_cam.png 查看文件


正在加载...
取消
保存