diff --git a/example_links.txt b/example_links.txt index 37512db..50b327f 100644 --- a/example_links.txt +++ b/example_links.txt @@ -53,6 +53,8 @@ are parsed. - C: clear filter - S: enter filter editor - +## Search bar tricks + +- Start search with / to enter relative URL diff --git a/index.html b/index.html index 6331ff8..50d12f4 100644 --- a/index.html +++ b/index.html @@ -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) {