aboutsummaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorjan <jan@ruken.pw>2016-01-17 12:35:04 (UTC)
committerjan <jan@ruken.pw>2016-01-17 12:35:04 (UTC)
commit912144bed682b982bb2f01e77444832aa52e2556 (patch)
tree6619b5d2061240cde0bb3416e39c5496f405c016 /assets
parent4f731893bf5bcb812c43da009773b0079b0aeee3 (diff)
highlighting in der instantsuche verbessert.
Diffstat (limited to 'assets')
-rw-r--r--assets/js/search.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/assets/js/search.js b/assets/js/search.js
index a6cc1f4..0cb33df 100644
--- a/assets/js/search.js
+++ b/assets/js/search.js
@@ -26,7 +26,8 @@ function doSearch() {
26 document.getElementById("search-results").innerHTML = ""; 26 document.getElementById("search-results").innerHTML = "";
27 return; 27 return;
28 } 28 }
29 document.getElementById("search-results").innerHTML = xhr.response.replace(new RegExp('>' + value + '</span>', 'gi'), "><b>" + value + "</b></span>"); 29
30 document.getElementById("search-results").innerHTML = xhr.response.replace(new RegExp('{ (.*?)(' + value + ')(.*?) }', 'gi'), "$1<b>$2</b>$3").replace(new RegExp('{ (.*?) }', 'gi'), '$1');
30 } 31 }
31 } 32 }
32 xhr.open('GET', '/search/gril_instant/' + value, true); 33 xhr.open('GET', '/search/gril_instant/' + value, true);