Make NYTimes more stable, add rewriting for <image> tags.

This commit is contained in:
wearrrrr 2024-09-28 16:39:56 -05:00
parent dc80bf1170
commit b6eb174bfe
2 changed files with 17 additions and 14 deletions

View file

@ -77,16 +77,17 @@ export default function (client: ScramjetClient, self: Self) {
}
}
Object.defineProperty(self, "event", {
get() {
return argArray[0];
},
configurable: true,
});
if (!self.event) {
Object.defineProperty(self, "event", {
get() {
return argArray[0];
},
configurable: true,
});
}
let rv = Reflect.apply(target, thisArg, argArray);
const rv = Reflect.apply(target, thisArg, argArray);
delete self.event;
return rv;
},