实现gmxhr
Some checks failed
build / Build (push) Failing after 6s
test / Run tests (push) Failing after 8s

This commit is contained in:
2025-04-07 00:37:58 +08:00
parent a8054451ac
commit 1a55bb348f
13 changed files with 1255 additions and 517 deletions

View File

@ -13,14 +13,21 @@ const data = new FormData();
data.append("username", "admin");
data.append(
"file",
new File(["foo"], "foo.txt", {
type: "text/plain",
})
);
GM_xmlhttpRequest({
url: "https://bbs.tampermonkey.net.cn/",
method: "POST",
responseType: "blob",
data: data,
headers: {
"referer": "http://www.example.com/",
"origin": "www.example.com",
referer: "http://www.example.com/",
origin: "www.example.com",
// 为空将不会发送此header
"sec-ch-ua-mobile": "",
},