Home-Toolbox-Plugin/contents/invokeFetch.ts

23 lines
420 B
TypeScript

import type { PlasmoCSConfig } from "plasmo"
export const config: PlasmoCSConfig = {
matches: ["<all_urls>"],
world: "MAIN"
}
// export {}
console.log(
"You may find that having is not so pleasing a thing as wanting. This is not logical, but it is often true."
)
const defaultFetch = window.fetch;
window.fetch = (...args) => {
console.log(args);
return defaultFetch(...args);
}
console.log(fetch);