mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Fix bug in Ajax
This commit is contained in:
parent
72586b1d20
commit
e31120fbfe
@ -86,6 +86,7 @@
|
||||
downloadVideo: true,
|
||||
downloadDanmaku: true,
|
||||
useDefaultPlayerMode: true,
|
||||
medalHelper: true,
|
||||
about: true,
|
||||
forceWide: false,
|
||||
latestVersionLink: "https://github.com/the1812/Bilibili-Evolved/raw/preview/bilibili-evolved.preview.user.js",
|
||||
@ -661,29 +662,29 @@
|
||||
{
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", url);
|
||||
return send(xhr);
|
||||
return this.send(xhr);
|
||||
}
|
||||
static getTextWithCredentials(url)
|
||||
{
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", url);
|
||||
xhr.withCredentials = true;
|
||||
return send(xhr);
|
||||
return this.send(xhr);
|
||||
}
|
||||
static postText(url, body)
|
||||
{
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", url);
|
||||
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||
return send(xhr, body);
|
||||
return this.send(xhr, body);
|
||||
}
|
||||
static postTextWithCredentials(url)
|
||||
static postTextWithCredentials(url, body)
|
||||
{
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", url);
|
||||
xhr.withCredentials = true;
|
||||
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||
return send(xhr, body);
|
||||
return this.send(xhr, body);
|
||||
}
|
||||
}
|
||||
function downloadText(url, load, error) // The old method for compatibility
|
||||
|
||||
Loading…
Reference in New Issue
Block a user