aboutsummaryrefslogtreecommitdiff
path: root/static/stork_config.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/stork_config.js')
-rw-r--r--static/stork_config.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/static/stork_config.js b/static/stork_config.js
index 5480a18..3c589c2 100644
--- a/static/stork_config.js
+++ b/static/stork_config.js
@@ -11,4 +11,15 @@ function loadStork() {
}); // download WASM
stork.register("stork",baseUrl + "/stork.st");
}
-loadStork(); \ No newline at end of file
+var loaded = false;
+window.onload = function() {
+ document.body.contains(document.goSearch) && (document.goSearch.onsubmit = function() { return goSearchNow() })
+ document.getElementById('searchinput').onfocus = function() {
+ if (!loaded) {
+ loadStork();
+ loaded = true;
+ document.body.contains(document.goSearch) && (document.goSearch.onsubmit = function() { return goSearchNow() })
+ }
+ document.getElementById('searchinput').onfocus = '';
+ }
+};