diff --git a/stable.user.js b/stable.user.js index 2858b6d..7248d80 100755 --- a/stable.user.js +++ b/stable.user.js @@ -1019,7 +1019,7 @@ sentData.id = GetId() sentData.quiz = quiz console.log('SENT DATA', sentData) - SendXHRMessage('datatoadd=' + JSON.stringify(sentData)).then((res) => { + SendXHRMessage(JSON.stringify(sentData)).then((res) => { next(res.success, sentData, res.newQuestions) }) } catch (e) { @@ -1623,9 +1623,14 @@ if (now > lastCheck + (infoExpireTime * 1000)) { return new Promise((resolve, reject) => { + const url = apiAdress + + 'infos?version=true&motd=true&subjinfo=true&cversion=' + + info().script.version + + '&cid=' + GetId() + xmlhttpRequest({ method: 'GET', - url: apiAdress + 'infos?version=true&motd=true&subjinfo=true&cversion=' + info().script.version, + url: url, onload: function (response) { try { setVal('lastInfoCheckTime', now) @@ -1668,7 +1673,9 @@ } params.push(key + '=' + encodeURIComponent(val)) }) - url += params.join('&') + url += params.join('&') + + '&cversion=' + info().script.version + + '&cid=' + GetId() xmlhttpRequest({ method: 'GET', @@ -1712,7 +1719,7 @@ url: url, data: message, headers: { - 'Content-Type': 'application/x-www-form-urlencoded' + 'Content-Type': 'application/json' }, onerror: function (e) { Log('Data send error', e)