From 13ad91024c057611f66f6599d4ed0bef5ff939fb Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 25 Aug 2005 07:57:51 +0100 Subject: more piggies! I demand MORE piggies!!! --- functions.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'functions.js') diff --git a/functions.js b/functions.js index b634974ab..8cd5b47ca 100644 --- a/functions.js +++ b/functions.js @@ -39,4 +39,32 @@ function printLockingError() { notify("Please wait until operation finishes"); } +var seq = ""; + +function hotkey_handler(e) { + var keycode; + + if (window.event) { + keycode = window.event.keyCode; + } else if (e) { + keycode = e.which; + } + + if (keycode == 13 || keycode == 27) { + seq = ""; + } else { + seq = seq + "" + keycode; + } + + var piggie = document.getElementById("piggie"); + + if (seq.match("807371717369")) { + localPiggieFunction(true); + } else { + localPiggieFunction(false); + } + +} + + -- cgit v1.2.3