fix: littleweb browser url
This commit is contained in:
parent
cfcc2358f4
commit
4d49fc3cdf
1 changed files with 9 additions and 1 deletions
|
@ -125,6 +125,14 @@
|
|||
// ...
|
||||
console.log(\"navigate\", uri);
|
||||
document.getElementById(\"browser_iframe\").src = `{{ config.lw_host|safe }}/api/v1/net/${uri}?s={{ session }}`;
|
||||
|
||||
if (!uri.includes(\"atto://\")) {
|
||||
document.getElementById(\"uri\").setAttribute(\"true_value\", `atto://${uri}`);
|
||||
} else {
|
||||
document.getElementById(\"uri\").setAttribute(\"true_value\", uri);
|
||||
}
|
||||
|
||||
document.getElementById(\"uri\").value = uri.replace(\"atto://\", \"\").split(\"/\")[0];
|
||||
}
|
||||
|
||||
document.getElementById(\"browser_iframe\").addEventListener(\"load\", (e) => {
|
||||
|
@ -156,7 +164,7 @@
|
|||
document.getElementById(\"uri\").setAttribute(\"true_value\", uri);
|
||||
}
|
||||
|
||||
document.getElementById(\"uri\").value = uri.split(\"/\")[0];
|
||||
document.getElementById(\"uri\").value = uri.replace(\"atto://\", \"\").split(\"/\")[0];
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue