|
|
|
@ -129,19 +129,19 @@ function run() {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// function saveCode() {
|
|
|
|
|
// var xhr = new XMLHttpRequest();
|
|
|
|
|
// // xhr.open('POST', 'http://localhost/Scripted/WEB/index.php?action=saveCode', true);
|
|
|
|
|
// xhr.open('POST', 'http://82.165.180.114/Scripted/WEB/index.php?action=saveCode', true);
|
|
|
|
|
// xhr.responseType = 'text';
|
|
|
|
|
// xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
|
|
|
|
// xhr.onload = function () {
|
|
|
|
|
// // console.log('saveCode'+xhr.responseText);
|
|
|
|
|
// };
|
|
|
|
|
// var searchParams = new URLSearchParams(window.location.search);
|
|
|
|
|
// var ordre = searchParams.get('ordre');
|
|
|
|
|
// xhr.send("code=" + editor.getValue() + "&ordre=" + ordre);
|
|
|
|
|
// }
|
|
|
|
|
function saveCode() {
|
|
|
|
|
var xhr = new XMLHttpRequest();
|
|
|
|
|
// xhr.open('POST', 'http://localhost/Scripted/WEB/index.php?action=saveCode', true);
|
|
|
|
|
xhr.open('POST', 'http://82.165.180.114/Scripted/WEB/index.php?action=saveCode', true);
|
|
|
|
|
xhr.responseType = 'text';
|
|
|
|
|
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
|
|
|
|
xhr.onload = function () {
|
|
|
|
|
// console.log('saveCode'+xhr.responseText);
|
|
|
|
|
};
|
|
|
|
|
var searchParams = new URLSearchParams(window.location.search);
|
|
|
|
|
var ordre = searchParams.get('ordre');
|
|
|
|
|
xhr.send("code=" + editor.getValue() + "&ordre=" + ordre);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// document.getElementById ('editor').addEventListener('input', saveCode);
|
|
|
|
|
document.getElementById ('editor').addEventListener('input', saveCode);
|
|
|
|
|
|