refactor/api-prox: hook loading and running

This commit is contained in:
Kentai Radiquum 2025-09-06 16:08:13 +05:00
parent 32e830cae1
commit deb92f1480
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
10 changed files with 4409 additions and 26 deletions

View file

@ -0,0 +1,13 @@
function match(url: URL): boolean {
return url.pathname == "/profile/1";
}
function hook(data: any, _: URL) {
const newUname = "Anixartiki";
if (!data.hasOwnProperty("profile") || !data.profile) return data;
data["profile"]["login"] = newUname;
return data;
}
const entrypoint = { priority: 1, match, hook }
export default entrypoint;