mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-24 17:27:08 +01:00
Time params on the action and URI encode content
This commit is contained in:
@@ -2070,6 +2070,10 @@ var ICEcoder = {
|
||||
if (xhr.readyState==4 && xhr.status==200) {
|
||||
// console.log(xhr.responseText);
|
||||
var statusArray = JSON.parse(xhr.responseText);
|
||||
|
||||
// Set the actions end time and time taken in JSON object
|
||||
statusArray.action.timeEnd = new Date().getTime();
|
||||
statusArray.action.timeTaken = statusArray.action.timeEnd - statusArray.action.timeStart;
|
||||
// console.log(statusArray);
|
||||
|
||||
if (statusArray.status.error) {
|
||||
@@ -2084,7 +2088,8 @@ var ICEcoder = {
|
||||
// console.log('Calling '+saveURL+' via XHR');
|
||||
xhr.open("POST",saveURL,true);
|
||||
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
||||
xhr.send('contents='+top.document.getElementById('saveTemp1').value);
|
||||
timeStart = new Date().getTime();
|
||||
xhr.send('timeStart='+timeStart+'&contents='+encodeURIComponent(top.document.getElementById('saveTemp1').value));
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user