]>
git.wh0rd.org - tt-rss.git/blob - functions.js
1 function notify_callback() {
2 var container
= document
.getElementById('notify');
3 if (xmlhttp
.readyState
== 4) {
4 container
.innerHTML
=xmlhttp
.responseText
;
8 function rpc_notify_callback() {
9 var container
= document
.getElementById('notify');
10 if (xmlhttp_rpc
.readyState
== 4) {
11 container
.innerHTML
=xmlhttp_rpc
.responseText
;
15 function param_escape(arg
) {
16 if (typeof encodeURIComponent
!= 'undefined')
17 return encodeURIComponent(arg
);
22 function param_unescape(arg
) {
23 if (typeof decodeURIComponent
!= 'undefined')
24 return decodeURIComponent(arg
);
31 then
=new Date().getTime();
33 while((now
-then
)<gap
) {
34 now
=new Date().getTime();
38 function notify(msg
) {
40 var n
= document
.getElementById("notify");
44 if (msg
.length
== 0) {
45 n
.style
.display
= "none";
47 n
.style
.display
= "block";
52 function printLockingError() {
53 notify("Please wait until operation finishes");
58 function hotkey_handler(e
) {
62 keycode
= window
.event
.keyCode
;
67 if (keycode
== 13 || keycode
== 27) {
70 seq
= seq
+ "" + keycode
;
73 var piggie
= document
.getElementById("piggie");
75 if (seq
.match("807371717369")) {
76 localPiggieFunction(true);
78 localPiggieFunction(false);
81 if (typeof localHotkeyHandler
!= 'undefined') {
82 localHotkeyHandler(keycode
);