aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/resources/dokka/scripts/search.js
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/main/resources/dokka/scripts/search.js')
-rw-r--r--plugins/base/src/main/resources/dokka/scripts/search.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/base/src/main/resources/dokka/scripts/search.js b/plugins/base/src/main/resources/dokka/scripts/search.js
new file mode 100644
index 00000000..04d88ab5
--- /dev/null
+++ b/plugins/base/src/main/resources/dokka/scripts/search.js
@@ -0,0 +1,7 @@
+let query = new URLSearchParams(window.location.search).get("query");
+document.getElementById("searchTitle").innerHTML += '"' + query + '":';
+document.getElementById("searchTable").innerHTML = pages
+ .filter(el => el.name.toLowerCase().startsWith(query.toLowerCase()))
+ .reduce((acc, element) => {
+ return acc + '<tr><td><a href="' + element.location + '">' + element.name + '</a></td></tr>'
+ }, ""); \ No newline at end of file