Spaces:
No application file
No application file
Update browser_automation_ui.html
Browse files
browser_automation_ui.html
CHANGED
|
@@ -99,7 +99,7 @@
|
|
| 99 |
<button class="btn btn-primary" onclick="takeScreenshot()"><i class="lucide lucide-camera"></i>Capture</button>
|
| 100 |
<a id="downloadBtn"
|
| 101 |
class="btn btn-secondary"
|
| 102 |
-
style="display:
|
| 103 |
download="screenshot.png">
|
| 104 |
<i class="lucide lucide-download"></i>Download
|
| 105 |
</a>
|
|
@@ -232,6 +232,7 @@ All endpoints return { ok: true/false, data, error }
|
|
| 232 |
|
| 233 |
async function takeScreenshot () {
|
| 234 |
const out = await api('/browser/screenshot');
|
|
|
|
| 235 |
|
| 236 |
// Separate the big base64 string so we don’t dump it in the response box
|
| 237 |
const { b64, ...meta } = out;
|
|
@@ -239,7 +240,6 @@ All endpoints return { ok: true/false, data, error }
|
|
| 239 |
|
| 240 |
if (b64) {
|
| 241 |
const dataUrl = `data:image/png;base64,${b64}`;
|
| 242 |
-
window.alert("Your message here");
|
| 243 |
|
| 244 |
// Show thumbnail
|
| 245 |
document.getElementById('shotPreview').innerHTML =
|
|
|
|
| 99 |
<button class="btn btn-primary" onclick="takeScreenshot()"><i class="lucide lucide-camera"></i>Capture</button>
|
| 100 |
<a id="downloadBtn"
|
| 101 |
class="btn btn-secondary"
|
| 102 |
+
style="display:block;margin-left:8px;"
|
| 103 |
download="screenshot.png">
|
| 104 |
<i class="lucide lucide-download"></i>Download
|
| 105 |
</a>
|
|
|
|
| 232 |
|
| 233 |
async function takeScreenshot () {
|
| 234 |
const out = await api('/browser/screenshot');
|
| 235 |
+
alert("Your message here");
|
| 236 |
|
| 237 |
// Separate the big base64 string so we don’t dump it in the response box
|
| 238 |
const { b64, ...meta } = out;
|
|
|
|
| 240 |
|
| 241 |
if (b64) {
|
| 242 |
const dataUrl = `data:image/png;base64,${b64}`;
|
|
|
|
| 243 |
|
| 244 |
// Show thumbnail
|
| 245 |
document.getElementById('shotPreview').innerHTML =
|