projects
/
brisk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TODO updated
[brisk.git]
/
web
/
commons.js
diff --git
a/web/commons.js
b/web/commons.js
index
711b086
..
158dc54
100644
(file)
--- a/
web/commons.js
+++ b/
web/commons.js
@@
-1,7
+1,7
@@
/*
* brisk - commons.js
*
/*
* brisk - commons.js
*
- * Copyright (C) 2006-201
1
Matteo Nastasi
+ * Copyright (C) 2006-201
2
Matteo Nastasi
* mailto: nastasi@alternativeoutput.it
* matteo.nastasi@milug.org
* web: http://www.alternativeoutput.it
* mailto: nastasi@alternativeoutput.it
* matteo.nastasi@milug.org
* web: http://www.alternativeoutput.it
@@
-38,9
+38,14
@@
var mlang_commons = { 'imgload_a' : { 'it' : 'Immagine caricate ',
'btn_sit' : { 'it' : 'Mi siedo.',
'en' : 'Sit down.' },
'btn_exit' : { 'it' : 'Esco.',
'btn_sit' : { 'it' : 'Mi siedo.',
'en' : 'Sit down.' },
'btn_exit' : { 'it' : 'Esco.',
- 'en' : 'Exit.' }
-
- };
+ 'en' : 'Exit.' },
+ 'tit_list' : { '0' : { 'it' : '',
+ 'en' : '' },
+ '1' : { 'it' : '(solo aut.)',
+ 'en' : '(only aut.)' },
+ '2' : { 'it' : '(isolam.to)',
+ 'en' : '(isolation)' } }
+ };
function $(id) { return document.getElementById(id); }
function $(id) { return document.getElementById(id); }
@@
-235,8
+240,10
@@
function safestatus(a)
}
function createXMLHttpRequest() {
}
function createXMLHttpRequest() {
- try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) {}
- try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {}
+ if (typeof(ActiveXObject) != 'undefined') { // Konqueror complain as unknown object
+ try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) {}
+ try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {}
+ }
try { return new XMLHttpRequest(); } catch(e) {}
alert("XMLHttpRequest not supported");
return null;
try { return new XMLHttpRequest(); } catch(e) {}
alert("XMLHttpRequest not supported");
return null;
@@
-249,12
+256,12
@@
function send_mesg(mesg)
// alert("xhr_wr: "+xhr_wr+" is_conn: "+is_conn);
xhr_wr.open('GET', 'index_wr.php?'+(is_conn ? 'sess='+sess+'&' : '')+'mesg='+mesg, (is_conn ? true : false));
// alert("xhr_wr: "+xhr_wr+" is_conn: "+is_conn);
xhr_wr.open('GET', 'index_wr.php?'+(is_conn ? 'sess='+sess+'&' : '')+'mesg='+mesg, (is_conn ? true : false));
+ xhr_wr.setRequestHeader("If-Modified-Since", new Date().toUTCString());
xhr_wr.onreadystatechange = function() { return; };
xhr_wr.onreadystatechange = function() { return; };
- if (typeof(
console) == 'object') {
-
if (
typeof(console.log) == 'function') {
+ if (typeof(
g_debug) == 'number' && g_debug > 0
+
&& typeof(console) == 'object' &&
typeof(console.log) == 'function') {
var ldate = new Date();
console.log(ldate.getTime()+':MESG:'+mesg);
var ldate = new Date();
console.log(ldate.getTime()+':MESG:'+mesg);
- }
}
xhr_wr.send(null);
}
xhr_wr.send(null);
@@
-330,6
+337,11
@@
function act_chatt(value)
}
/* Stat: ROOM */
}
/* Stat: ROOM */
+function act_ping()
+{
+ send_mesg("ping");
+}
+
function act_sitdown(table)
{
send_mesg("sitdown|"+table);
function act_sitdown(table)
{
send_mesg("sitdown|"+table);