scramjet/src/client/shared/requests/beacon.ts
2024-10-12 15:00:03 -04:00

10 lines
273 B
TypeScript

import { rewriteUrl } from "../../../shared";
import { ScramjetClient } from "../../client";
export default function (client: ScramjetClient, self) {
client.Proxy("navigator.sendBeacon", {
apply(ctx) {
ctx.args[0] = rewriteUrl(ctx.args[0], client.meta);
},
});
}