|
@@ -17,6 +17,10 @@ function dmdirc_start() {
|
17
|
17
|
setTimeout(doUpdate, 100);
|
18
|
18
|
}
|
19
|
19
|
|
|
20
|
+function log() {
|
|
21
|
+ console && console.log && console.log.apply(console, arguments);
|
|
22
|
+}
|
|
23
|
+
|
20
|
24
|
(function() {
|
21
|
25
|
Treeview = function(element) {
|
22
|
26
|
this.element = element;
|
|
@@ -125,10 +129,7 @@ function dmdirc_start() {
|
125
|
129
|
},
|
126
|
130
|
|
127
|
131
|
add: function(nick) {
|
128
|
|
- var entry = document.createElement('li');
|
129
|
|
- entry.innerHTML = nick;
|
130
|
|
-
|
131
|
|
- this.element.append(entry);
|
|
132
|
+ this.element.append($('<li>').text(nick));
|
132
|
133
|
},
|
133
|
134
|
|
134
|
135
|
hide: function() {
|
|
@@ -458,7 +459,7 @@ function updateHandlerFunc(transport) {
|
458
|
459
|
handlerFunc(transport);
|
459
|
460
|
doUpdate();
|
460
|
461
|
} catch (ex) {
|
461
|
|
- console && console.log('Exception: ' + ex.stack);
|
|
462
|
+ log('Exception when handling update results', ex);
|
462
|
463
|
}
|
463
|
464
|
}
|
464
|
465
|
|
|
@@ -506,5 +507,6 @@ function updateErrFunc(transport) {
|
506
|
507
|
function errFunc(transport) {
|
507
|
508
|
statusbar_settext('Error while perfoming remote call...');
|
508
|
509
|
|
509
|
|
- console && console.log(transport.status + "\n" + transport.statusText + "\n" + transport.responseText);
|
|
510
|
+ log('Error when performing remote call, status: ', transport.status,
|
|
511
|
+ ' text: ', transport.statusText, ' response: ', transport.responseText);
|
510
|
512
|
}
|