mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 06:20:02 -04:00
20 lines
373 B
TypeScript
20 lines
373 B
TypeScript
import { ScramjetClient } from "../client";
|
|
|
|
export default function (client: ScramjetClient) {
|
|
client.Proxy("console.clear", {
|
|
apply(ctx) {
|
|
// fuck you
|
|
ctx.return(undefined);
|
|
},
|
|
});
|
|
|
|
const log = console.log;
|
|
client.Trap("console.log", {
|
|
set(_ctx, _v) {
|
|
// is there a legitimate reason to let sites do this?
|
|
},
|
|
get(_ctx) {
|
|
return log;
|
|
},
|
|
});
|
|
}
|