Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +6 -1
templates/index.html
CHANGED
|
@@ -66,7 +66,12 @@
|
|
| 66 |
iframe.id = "generatedFrame";
|
| 67 |
iframe.style.width = "100%";
|
| 68 |
iframe.style.height = "72vh";
|
| 69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
outputEl.appendChild(iframe);
|
| 71 |
// Add Download Report button
|
| 72 |
const btn = document.createElement("button");
|
|
|
|
| 66 |
iframe.id = "generatedFrame";
|
| 67 |
iframe.style.width = "100%";
|
| 68 |
iframe.style.height = "72vh";
|
| 69 |
+
if (data.link) {
|
| 70 |
+
iframe.src = data.link;
|
| 71 |
+
} else {
|
| 72 |
+
const blob = new Blob([data.html], { type: "text/html" });
|
| 73 |
+
iframe.src = URL.createObjectURL(blob);
|
| 74 |
+
}
|
| 75 |
outputEl.appendChild(iframe);
|
| 76 |
// Add Download Report button
|
| 77 |
const btn = document.createElement("button");
|