Закончил разработку обучения
This commit is contained in:
@@ -1,3 +1,24 @@
|
||||
const request = new XMLHttpRequest();
|
||||
|
||||
const training_handler = () => {
|
||||
request.open('POST', '/api/training/complete')
|
||||
request.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
|
||||
request.onreadystatechange = function() {//Call a function when the state changes.
|
||||
if(request.readyState === 4 && request.status === 200) {
|
||||
parent.frames['main'].location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
request.send(JSON.stringify({
|
||||
time: training_data().time,
|
||||
token: training_data().token,
|
||||
short_name: training_data().short_name
|
||||
}))
|
||||
|
||||
}
|
||||
|
||||
let active_training = null;
|
||||
|
||||
(function () {
|
||||
if (typeof window.CustomEvent === "function") return false;
|
||||
function CustomEvent(event, params) {
|
||||
|
||||
Reference in New Issue
Block a user