|
|
@ -45,12 +45,12 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// eval server-side
|
|
|
|
// eval server-side
|
|
|
|
$.post('?js=1', { code: editor.getSession().getValue() }, function (res, status, jqXHR) { |
|
|
|
$.post('?js=1', {code: editor.getSession().getValue()}, function (res, status, jqXHR) { |
|
|
|
var mem = jqXHR.getResponseHeader("X-Memory-Usage") || "", |
|
|
|
var mem = jqXHR.getResponseHeader("X-Memory-Usage") || "", |
|
|
|
rendertime = jqXHR.getResponseHeader("X-Rendertime") || ""; |
|
|
|
rendertime = jqXHR.getResponseHeader("X-Rendertime") || ""; |
|
|
|
|
|
|
|
|
|
|
|
if (mem || rendertime) { |
|
|
|
if (mem || rendertime) { |
|
|
|
$('.statusbar .runtime-info').text('Memory usage: '+ mem + ' MB, Rendertime: ' + rendertime + 'ms'); |
|
|
|
$('.statusbar .runtime-info').text('Memory usage: ' + mem + ' MB, Rendertime: ' + rendertime + 'ms'); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$('.statusbar .runtime-info').text(''); |
|
|
|
$('.statusbar .runtime-info').text(''); |
|
|
|
} |
|
|
|
} |
|
|
@ -65,7 +65,7 @@ |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
handleAjaxError = function (event, jqxhr, settings, exception) { |
|
|
|
handleAjaxError = function (event, jqxhr, settings, exception) { |
|
|
|
$('div.output').html("<em>Error occured while posting your code.</em>"); |
|
|
|
$('div.output').html("<em>Error occured while posting your code.</em>" + jqxhr.responseText); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
initializeAce = function () { |
|
|
|
initializeAce = function () { |
|
|
|