diff options
author | Holger Levsen <holger@debian.org> | 2014-09-20 09:42:28 +0000 |
---|---|---|
committer | Holger Levsen <holger@debian.org> | 2014-09-20 09:42:28 +0000 |
commit | 10267032487436ddc2815722c60e7976b506e879 (patch) | |
tree | ff0b4c06c7df93c3d3e101e1b64fcc231a34ca6c /static/script.js | |
parent | 1edc586f31db67b509cc5adbf54a6436b5e1ef72 (diff) |
move javascript code into external file
git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@28928 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'static/script.js')
-rw-r--r-- | static/script.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/static/script.js b/static/script.js new file mode 100644 index 0000000000..62ec7ebf29 --- /dev/null +++ b/static/script.js @@ -0,0 +1,15 @@ +var old_query_value = ""; +function selectSearch() { +document.searchForm.query.focus(); +} + +function onSearch(query) { +if (old_query_value == "") { + if (query.length > 5) { + old_query_value = query; + document.searchForm.submit(); + } else { + old_query_value = query; + } +} +} |