aboutsummaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorÖzgür Kesim <oec@codeblau.de>2019-06-14 11:02:54 +0200
committerÖzgür Kesim <oec@codeblau.de>2019-06-14 11:02:54 +0200
commit4d20598a28a3139cea545736eca90df88a608e1b (patch)
tree1381b5924bc0d4603f288ed8f58829ea6d998c2d /index.html
parent6c7d5f258fc754e6623a9a0b56d4420c068f6931 (diff)
parent1e3b329150d6c259ba058f8d8f2e1b3fd4bb525d (diff)
Merge branch 'master' of github.com:/oec/playdot
Diffstat (limited to 'index.html')
-rw-r--r--index.html6
1 files changed, 5 insertions, 1 deletions
diff --git a/index.html b/index.html
index f4cd42d..37ab4aa 100644
--- a/index.html
+++ b/index.html
@@ -161,7 +161,11 @@ function run() {
req.onreadystatechange = function() {
switch (req.status) {
case 200:
- output.innerHTML = req.responseText;
+ if (req.getResponseHeader("Content-Type") === "img/png") {
+ output.innerHTML = '<img src="data:image/png;base64,' + req.responseText + '"/>';
+ } else {
+ output.innerHTML = req.responseText;
+ }
break;
case 400:
output.innerHTML = '<pre class="error">'+req.responseText+'</pre>';