relative folders

This commit is contained in:
Ville Rantanen
2020-01-26 09:19:12 +02:00
parent 21c1468fea
commit 6746c59983
2 changed files with 7 additions and 1 deletions

View File

@@ -53,6 +53,8 @@ are parsed.
- C: clear filter
- S: enter filter editor
## Search bar tricks
- Start search with / to enter relative URL

View File

@@ -147,6 +147,10 @@ function filter(ev) {
if (ev == null) { return }
var key=ev.keyCode;
if (key==13){
/* If search starts with / "cd" to that folder. (also /.. works)*/
if (needle.startsWith("/")) {
window.location.href = needle.substring(1);
}
if (c==0) { document.getElementById('filter').focus(); }
if (c==1) { open_link(lastHit); }
if (c>1) {