Spaces:
No application file
No application file
Update browser_automation_ui.html
Browse files- browser_automation_ui.html +6 -30
browser_automation_ui.html
CHANGED
|
@@ -8,11 +8,10 @@
|
|
| 8 |
<head>
|
| 9 |
<meta charset="UTF-8" />
|
| 10 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 11 |
-
<title>Headless Browser
|
| 12 |
<!-- Fonts & Icons -->
|
| 13 |
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Code+Pro:wght@400;500&display=swap" rel="stylesheet" />
|
| 14 |
<link href="https://cdnjs.cloudflare.com/ajax/libs/lucide/0.263.1/lucide.min.css" rel="stylesheet" />
|
| 15 |
-
|
| 16 |
<style>
|
| 17 |
:root { --panel-w: 280px; --accent: #2563eb; --bg: #f8fafc; --dark: #1e293b; }
|
| 18 |
*{box-sizing:border-box;font-family:'Inter',sans-serif;margin:0;padding:0}
|
|
@@ -49,21 +48,6 @@
|
|
| 49 |
#inspectList li{padding:4px 6px;border-bottom:1px solid rgba(255,255,255,.08);cursor:pointer}
|
| 50 |
#inspectList li:hover{background:rgba(255,255,255,.08)}
|
| 51 |
#inspectDetail{margin-top:6px;font-size:11px;color:#cbd5e1;white-space:pre-wrap}
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
</style>
|
| 68 |
</head>
|
| 69 |
<body>
|
|
@@ -81,7 +65,7 @@
|
|
| 81 |
<button class="btn btn-secondary" onclick="captureScreenshot()"><i class="lucide lucide-camera"></i>Capture</button>
|
| 82 |
<button class="btn btn-secondary" onclick="downloadCurrentScreenshot()"><i class="lucide lucide-download"></i>Download</button>
|
| 83 |
</div>
|
| 84 |
-
<div class="form-group"><button class="btn btn-danger" onclick="closeAllSessions()"><i class="lucide lucide-trash-2"></i>Close
|
| 85 |
</section>
|
| 86 |
<hr/>
|
| 87 |
<!-- Element Interaction -->
|
|
@@ -131,17 +115,6 @@
|
|
| 131 |
async function apiPost(path, body={}){
|
| 132 |
const res = await fetch(`${API}${path}`,{method:'POST',headers,body:JSON.stringify(body)});
|
| 133 |
if(!res.ok) throw new Error(await res.text());
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
return res.json();
|
| 146 |
}
|
| 147 |
async function apiGet(path){const res=await fetch(`${API}${path}`);if(!res.ok)throw new Error(await res.text());return res.json();}
|
|
@@ -207,4 +180,7 @@
|
|
| 207 |
document.addEventListener('keydown',e=>{if(e.key==='Escape')document.getElementById('inspectOverlay').classList.remove('open');});
|
| 208 |
|
| 209 |
/* ββββββββββ Initial UI setup ββββββββββ */
|
| 210 |
-
refreshSessions();log('UI ready');
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
<head>
|
| 9 |
<meta charset="UTF-8" />
|
| 10 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 11 |
+
<title>Headless BrowserΒ Console</title>
|
| 12 |
<!-- Fonts & Icons -->
|
| 13 |
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Code+Pro:wght@400;500&display=swap" rel="stylesheet" />
|
| 14 |
<link href="https://cdnjs.cloudflare.com/ajax/libs/lucide/0.263.1/lucide.min.css" rel="stylesheet" />
|
|
|
|
| 15 |
<style>
|
| 16 |
:root { --panel-w: 280px; --accent: #2563eb; --bg: #f8fafc; --dark: #1e293b; }
|
| 17 |
*{box-sizing:border-box;font-family:'Inter',sans-serif;margin:0;padding:0}
|
|
|
|
| 48 |
#inspectList li{padding:4px 6px;border-bottom:1px solid rgba(255,255,255,.08);cursor:pointer}
|
| 49 |
#inspectList li:hover{background:rgba(255,255,255,.08)}
|
| 50 |
#inspectDetail{margin-top:6px;font-size:11px;color:#cbd5e1;white-space:pre-wrap}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
</style>
|
| 52 |
</head>
|
| 53 |
<body>
|
|
|
|
| 65 |
<button class="btn btn-secondary" onclick="captureScreenshot()"><i class="lucide lucide-camera"></i>Capture</button>
|
| 66 |
<button class="btn btn-secondary" onclick="downloadCurrentScreenshot()"><i class="lucide lucide-download"></i>Download</button>
|
| 67 |
</div>
|
| 68 |
+
<div class="form-group"><button class="btn btn-danger" onclick="closeAllSessions()"><i class="lucide lucide-trash-2"></i>CloseΒ All</button></div>
|
| 69 |
</section>
|
| 70 |
<hr/>
|
| 71 |
<!-- Element Interaction -->
|
|
|
|
| 115 |
async function apiPost(path, body={}){
|
| 116 |
const res = await fetch(`${API}${path}`,{method:'POST',headers,body:JSON.stringify(body)});
|
| 117 |
if(!res.ok) throw new Error(await res.text());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
return res.json();
|
| 119 |
}
|
| 120 |
async function apiGet(path){const res=await fetch(`${API}${path}`);if(!res.ok)throw new Error(await res.text());return res.json();}
|
|
|
|
| 180 |
document.addEventListener('keydown',e=>{if(e.key==='Escape')document.getElementById('inspectOverlay').classList.remove('open');});
|
| 181 |
|
| 182 |
/* ββββββββββ Initial UI setup ββββββββββ */
|
| 183 |
+
refreshSessions();log('UI ready');
|
| 184 |
+
</script>
|
| 185 |
+
</body>
|
| 186 |
+
</html>
|