From b4f682b53315a5c2e61d230014929fd1925c16fd Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 20 Sep 2014 09:42:28 +0000 Subject: move javascript code into external file git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@28928 e39458fd-73e7-0310-bf30-c45bca0a0e42 --- static/script.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 static/script.js (limited to 'static') 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; + } +} +} -- cgit v1.2.3