summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--help3xsl/help.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/help3xsl/help.js b/help3xsl/help.js
index 2767b157f8..1e92f6ef99 100644
--- a/help3xsl/help.js
+++ b/help3xsl/help.js
@@ -81,6 +81,17 @@ function debounce(fn, wait) {
}
search.addEventListener('keyup', debounce(filter, 100));
+// Preserve search input value during the session
+search.value = sessionStorage.getItem('searchsave');
+
+if (search.value !== undefined) {
+ filter();
+}
+
+window.addEventListener('unload', function(event) {
+ sessionStorage.setItem('searchsave', search.value);
+});
+
// copy pycode and bascode to clipboard on mouse click
// Show border when copy is done
divcopyable(document.getElementsByClassName("bascode"));