From 549bc41911a9a2fa27d1d2f04267fa9c7a6e76e2 Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 25 Jul 2024 13:34:01 +0800 Subject: [PATCH] Add doc search controls. --- src/en/template.html | 35 +++++++++++++++++++++++++++++++++-- src/lib/script.js | 3 ++- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/src/en/template.html b/src/en/template.html index fc0797dd5..77444e37d 100644 --- a/src/en/template.html +++ b/src/en/template.html @@ -845,8 +845,39 @@ - -
+
+
+ + + +
+
+
diff --git a/src/lib/script.js b/src/lib/script.js index 8f0707f72..bf1696c55 100644 --- a/src/lib/script.js +++ b/src/lib/script.js @@ -3,7 +3,8 @@ function searchSite(inputId) { document.location.href = "https://www.google.com/search?sitesearch=www.originlab.com&q=" + encodeURIComponent(terms); } -function searchDoc(inputId, lang, book) { +function searchDoc(lang, inputId, selectId) { var terms = document.getElementById(inputId).value; + var book = document.getElementById(selectId).value; document.location.href = `https://www.google.com/search?sitesearch=www.originlab.com/doc/${lang}/${book}&` + encodeURIComponent(terms); } \ No newline at end of file