]>
Commit | Line | Data |
---|---|---|
7726fa02 AD |
1 | function param_escape(arg) { |
2 | if (typeof encodeURIComponent != 'undefined') | |
3 | return encodeURIComponent(arg); | |
4 | else | |
5 | return escape(arg); | |
6 | } | |
7 | ||
8 | function param_unescape(arg) { | |
9 | if (typeof decodeURIComponent != 'undefined') | |
10 | return decodeURIComponent(arg); | |
11 | else | |
12 | return unescape(arg); | |
13 | } | |
14 | ||
508a81e1 AD |
15 | function delay(gap) { |
16 | var then,now; | |
17 | then=new Date().getTime(); | |
18 | now=then; | |
19 | while((now-then)<gap) { | |
20 | now=new Date().getTime(); | |
21 | } | |
22 | } | |
7726fa02 AD |
23 | |
24 | function notify(msg) { | |
25 | ||
26 | var n = document.getElementById("notify"); | |
27 | ||
28 | n.innerHTML = msg; | |
29 | ||
30 | if (msg.length == 0) { | |
31 | n.style.display = "none"; | |
32 | } else { | |
33 | n.style.display = "block"; | |
34 | } | |
35 | ||
36 | } | |
37 | ||
508a81e1 AD |
38 | function printLockingError() { |
39 | notify("Please wait until operation finishes"); | |
40 | } | |
41 | ||
13ad9102 AD |
42 | var seq = ""; |
43 | ||
44 | function hotkey_handler(e) { | |
45 | var keycode; | |
46 | ||
47 | if (window.event) { | |
48 | keycode = window.event.keyCode; | |
49 | } else if (e) { | |
50 | keycode = e.which; | |
51 | } | |
52 | ||
53 | if (keycode == 13 || keycode == 27) { | |
54 | seq = ""; | |
55 | } else { | |
56 | seq = seq + "" + keycode; | |
57 | } | |
58 | ||
59 | var piggie = document.getElementById("piggie"); | |
60 | ||
61 | if (seq.match("807371717369")) { | |
62 | localPiggieFunction(true); | |
63 | } else { | |
64 | localPiggieFunction(false); | |
65 | } | |
66 | ||
67 | } | |
68 | ||
69 | ||
7726fa02 | 70 |