Skip to content

Commit

Permalink
fix: fetch timeout in tampermonkey beta #55;
Browse files Browse the repository at this point in the history
  • Loading branch information
MapoMagpie committed May 12, 2024
1 parent ccd2491 commit b5178c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function xhrWapper<T extends RespType>(url: string, respType: T, cb: Even
return GM_xmlhttpRequest<unknown, T>({
method: "GET",
url,
timeout: timeout || 0,
timeout: timeout || 600000,
responseType: respType,
nocache: false,
revalidate: false,
Expand All @@ -29,6 +29,7 @@ export function xhrWapper<T extends RespType>(url: string, respType: T, cb: Even
// "Accept-Encoding": "gzip, deflate, br",
// "Connection": "keep-alive",
"Referer": window.location.href,
"X-Alt-Referer": window.location.href,
// "Sec-Fetch-Dest": "image",
// "Sec-Fetch-Mode": "no-cors",
// "Sec-Fetch-Site": "cross-site",
Expand Down

0 comments on commit b5178c1

Please sign in to comment.