hooks-web.js 564 B

1
  1. !function(){"use strict";(e=>{const t=e.CustomEvent,a=e.fetch;var s,c,i;s="single-file-request-fetch",c=async s=>{const c=s.detail;let i;try{const e=await a(c,{cache:"force-cache",headers:new Headers({accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"})});i={url:c,response:await e.arrayBuffer(),headers:[...e.headers],status:e.status}}catch(e){i={url:c,error:e&&e.toString()}}(t=>{e.dispatchEvent(t)})(new t("single-file-response-fetch",{detail:i}))},e.addEventListener(s,c,i)})("object"==typeof globalThis?globalThis:window)}();