Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -1517,7 +1517,7 @@ async def root():
|
|
| 1517 |
|
| 1518 |
function copyCode(btn) {
|
| 1519 |
const block = btn.parentElement;
|
| 1520 |
-
const text = block.innerText.replace(
|
| 1521 |
navigator.clipboard.writeText(text).then(() => {
|
| 1522 |
btn.textContent = 'β copied';
|
| 1523 |
setTimeout(() => btn.textContent = 'copy', 1800);
|
|
@@ -1534,7 +1534,7 @@ async def root():
|
|
| 1534 |
const statusEl = document.getElementById(statusId);
|
| 1535 |
area.style.display = 'block';
|
| 1536 |
statusEl.className = 'status-pill ' + (status === 200 ? 'status-200' : 'status-err');
|
| 1537 |
-
statusEl.textContent = status + ' Error';
|
| 1538 |
document.getElementById(outId).textContent = JSON.stringify(data, null, 2);
|
| 1539 |
}
|
| 1540 |
|
|
@@ -1609,8 +1609,11 @@ async def root():
|
|
| 1609 |
|
| 1610 |
function escHtml(s) {
|
| 1611 |
if (!s) return '';
|
| 1612 |
-
return String(s)
|
| 1613 |
-
|
|
|
|
|
|
|
|
|
|
| 1614 |
|
| 1615 |
// ββ JOURNEY ββ
|
| 1616 |
async function runJourney() {
|
|
|
|
| 1517 |
|
| 1518 |
function copyCode(btn) {
|
| 1519 |
const block = btn.parentElement;
|
| 1520 |
+
const text = block.innerText.replace(new RegExp('^copy\\n?'), '').trim();
|
| 1521 |
navigator.clipboard.writeText(text).then(() => {
|
| 1522 |
btn.textContent = 'β copied';
|
| 1523 |
setTimeout(() => btn.textContent = 'copy', 1800);
|
|
|
|
| 1534 |
const statusEl = document.getElementById(statusId);
|
| 1535 |
area.style.display = 'block';
|
| 1536 |
statusEl.className = 'status-pill ' + (status === 200 ? 'status-200' : 'status-err');
|
| 1537 |
+
statusEl.textContent = status === 200 ? status + ' OK' : status + ' Error';
|
| 1538 |
document.getElementById(outId).textContent = JSON.stringify(data, null, 2);
|
| 1539 |
}
|
| 1540 |
|
|
|
|
| 1609 |
|
| 1610 |
function escHtml(s) {
|
| 1611 |
if (!s) return '';
|
| 1612 |
+
return String(s)
|
| 1613 |
+
.replace(new RegExp('&', 'g'), '&')
|
| 1614 |
+
.replace(new RegExp('<', 'g'), '<')
|
| 1615 |
+
.replace(new RegExp('>', 'g'), '>');
|
| 1616 |
+
}
|
| 1617 |
|
| 1618 |
// ββ JOURNEY ββ
|
| 1619 |
async function runJourney() {
|