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,
|
downloadVideo: true,
|
||||||
downloadDanmaku: true,
|
downloadDanmaku: true,
|
||||||
useDefaultPlayerMode: true,
|
useDefaultPlayerMode: true,
|
||||||
|
medalHelper: true,
|
||||||
about: true,
|
about: true,
|
||||||
forceWide: false,
|
forceWide: false,
|
||||||
latestVersionLink: "https://github.com/the1812/Bilibili-Evolved/raw/preview/bilibili-evolved.preview.user.js",
|
latestVersionLink: "https://github.com/the1812/Bilibili-Evolved/raw/preview/bilibili-evolved.preview.user.js",
|
||||||
@ -661,29 +662,29 @@
|
|||||||
{
|
{
|
||||||
const xhr = new XMLHttpRequest();
|
const xhr = new XMLHttpRequest();
|
||||||
xhr.open("GET", url);
|
xhr.open("GET", url);
|
||||||
return send(xhr);
|
return this.send(xhr);
|
||||||
}
|
}
|
||||||
static getTextWithCredentials(url)
|
static getTextWithCredentials(url)
|
||||||
{
|
{
|
||||||
const xhr = new XMLHttpRequest();
|
const xhr = new XMLHttpRequest();
|
||||||
xhr.open("GET", url);
|
xhr.open("GET", url);
|
||||||
xhr.withCredentials = true;
|
xhr.withCredentials = true;
|
||||||
return send(xhr);
|
return this.send(xhr);
|
||||||
}
|
}
|
||||||
static postText(url, body)
|
static postText(url, body)
|
||||||
{
|
{
|
||||||
const xhr = new XMLHttpRequest();
|
const xhr = new XMLHttpRequest();
|
||||||
xhr.open("POST", url);
|
xhr.open("POST", url);
|
||||||
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
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();
|
const xhr = new XMLHttpRequest();
|
||||||
xhr.open("POST", url);
|
xhr.open("POST", url);
|
||||||
xhr.withCredentials = true;
|
xhr.withCredentials = true;
|
||||||
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
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
|
function downloadText(url, load, error) // The old method for compatibility
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user