aboutsummaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
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>';