override = {
if (!window._MAIN) {
Set.prototype.forEach = function newForEach() {
if (!window._MAIN)
for (const s of this) {
if (
s._module &&
s._module._scope &&
s._module._scope.has("oldSetForEach")
) {
window._MAIN = s._module;
console.log('caught MAIN');
Set.prototype.forEach = oldSetForEach;
console.log('Set.prototype.forEach restored!');
break;
}
}
oldSetForEach.apply(this, arguments);
};
console.log('Set.prototype.forEach overridden!');
}
}