mirror of
https://gitlab.com/MrFry/moodle-test-userscript
synced 2025-04-01 20:22:48 +02:00
removed unnecesarry cookie stuff
This commit is contained in:
parent
daeb08341b
commit
d9f9a16b49
1 changed files with 0 additions and 6 deletions
|
@ -735,7 +735,6 @@
|
|||
SendXHRMessage('login', { pw: pw, script: true })
|
||||
.then((res) => {
|
||||
if (res.result === 'success') {
|
||||
setVal('sessionID', res.sessionID)
|
||||
ConnectToServer(AfterLoad)
|
||||
ClearAllMessages()
|
||||
setPassiveButtonState(false)
|
||||
|
@ -748,7 +747,6 @@
|
|||
}
|
||||
|
||||
function ConnectToServer (cwith) {
|
||||
setVal('sessionID', 'gfdgkldf')
|
||||
ClearAllMessages()
|
||||
GetXHRInfos().then((inf) => {
|
||||
if (inf.result === 'nouser') {
|
||||
|
@ -1699,12 +1697,10 @@
|
|||
info().script.version +
|
||||
'&cid=' + GetId()
|
||||
|
||||
console.log(getVal('sessionID'))
|
||||
xmlhttpRequest({
|
||||
method: 'GET',
|
||||
url: url,
|
||||
headers: {
|
||||
'Cookie': `sessionID=${getVal('sessionID')}`,
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
onload: function (response) {
|
||||
|
@ -1793,14 +1789,12 @@
|
|||
}
|
||||
const url = apiAdress + path
|
||||
return new Promise((resolve, reject) => {
|
||||
console.log(getVal('sessionID'))
|
||||
xmlhttpRequest({
|
||||
method: 'POST',
|
||||
url: url,
|
||||
xhrFields: { withCredentials: true },
|
||||
data: message,
|
||||
headers: {
|
||||
'Cookie': `sessionID=${getVal('sessionID')}`,
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
onerror: function (e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue