Преглед изворни кода

reorder printer live photo page

Thomas Buck пре 3 година
родитељ
комит
6ce9341e98
1 измењених фајлова са 34 додато и 41 уклоњено
  1. 34
    41
      input/unlisted/printer.md

+ 34
- 41
input/unlisted/printer.md Прегледај датотеку

@@ -5,27 +5,22 @@ position: 0
5 5
 noheader: true
6 6
 ---
7 7
 
8
-<script type="text/javascript">
9
-function LastModUsingHeader(sFile, callback) {
10
-    try {
11
-        var x = new XMLHttpRequest;
12
-        x.responseType = "blob";
13
-        x.onreadystatechange = function() {
14
-            if (x.readyState === 4 && x.status === 200) {
15
-                var dt = new Date(x.getResponseHeader('Last-Modified'))
16
-                callback(x.response, dt.toLocaleString());
17
-            }
18
-        };
19
-        x.open('GET', sFile, true);
20
-        x.send();
21
-    } catch(y) {  }
22
-}
23
-</script>
24
-
25 8
 # {{ page.title }}
26 9
 
27 10
 This page contains photos from the Webcams on my 3D printers, live-updated every 5 minutes.
28 11
 
12
+## CTC i3 Pro B
13
+
14
+<div id="date-2">
15
+    <noscript>
16
+        <a href="//www.xythobuz.de/printer-2.jpg">
17
+            <img src="//www.xythobuz.de/printer-2.jpg" alt="CTC i3 Pro B">
18
+        </a>
19
+    </noscript>
20
+</div>
21
+
22
+<hr>
23
+
29 24
 ## Fabrikator Mini V1.5
30 25
 
31 26
 <div id="date-1">
@@ -37,52 +32,50 @@ This page contains photos from the Webcams on my 3D printers, live-updated every
37 32
 </div>
38 33
 
39 34
 <script type="text/javascript">
40
-    var rt = LastModUsingHeader("//www.xythobuz.de/printer.jpg", function(i, u) {
35
+    function LastModUsingHeader(sFile, callback) {
36
+        try {
37
+            var x = new XMLHttpRequest;
38
+            x.responseType = "blob";
39
+            x.onreadystatechange = function() {
40
+                if (x.readyState === 4 && x.status === 200) {
41
+                    var dt = new Date(x.getResponseHeader('Last-Modified'))
42
+                    callback(x.response, dt.toLocaleString());
43
+                }
44
+            };
45
+            x.open('GET', sFile, true);
46
+            x.send();
47
+        } catch(y) {}
48
+    }
49
+    LastModUsingHeader("//www.xythobuz.de/printer-2.jpg", function(i, u) {
41 50
         var img = document.createElement("img");
42 51
         img.src = window.URL.createObjectURL(i);
43
-        img.alt = "Fabrikator Mini V1.5";
52
+        img.alt = "CTC i3 Pro B";
44 53
 
45 54
         var link = document.createElement("a");
46
-        link.href = "//www.xythobuz.de/printer.jpg";
55
+        link.href = "//www.xythobuz.de/printer-2.jpg";
47 56
         link.appendChild(img);
48 57
 
49 58
         var up = document.createElement("p");
50 59
         up.appendChild(document.createTextNode("Upload Date: " + u));
51 60
 
52
-        var dt = document.getElementById("date-1");
61
+        var dt = document.getElementById("date-2");
53 62
         dt.appendChild(link);
54 63
         dt.appendChild(up);
55 64
     });
56
-</script>
57
-
58
-<hr>
59
-
60
-## CTC i3 Pro B
61
-
62
-<div id="date-2">
63
-    <noscript>
64
-        <a href="//www.xythobuz.de/printer-2.jpg">
65
-            <img src="//www.xythobuz.de/printer-2.jpg" alt="CTC i3 Pro B">
66
-        </a>
67
-    </noscript>
68
-</div>
69
-
70
-<script type="text/javascript">
71
-    var rt = LastModUsingHeader("//www.xythobuz.de/printer-2.jpg", function(i, u) {
65
+    LastModUsingHeader("//www.xythobuz.de/printer.jpg", function(i, u) {
72 66
         var img = document.createElement("img");
73 67
         img.src = window.URL.createObjectURL(i);
74
-        img.alt = "CTC i3 Pro B";
68
+        img.alt = "Fabrikator Mini V1.5";
75 69
 
76 70
         var link = document.createElement("a");
77
-        link.href = "//www.xythobuz.de/printer-2.jpg";
71
+        link.href = "//www.xythobuz.de/printer.jpg";
78 72
         link.appendChild(img);
79 73
 
80 74
         var up = document.createElement("p");
81 75
         up.appendChild(document.createTextNode("Upload Date: " + u));
82 76
 
83
-        var dt = document.getElementById("date-2");
77
+        var dt = document.getElementById("date-1");
84 78
         dt.appendChild(link);
85 79
         dt.appendChild(up);
86 80
     });
87 81
 </script>
88
-

Loading…
Откажи
Сачувај