fix customcss

This commit is contained in:
Zack Rauen 2020-03-19 00:46:44 -04:00
parent 1ac8706563
commit 455e181e45
2 changed files with 5 additions and 4 deletions

View File

@ -11,7 +11,7 @@
const contentWindowGetter = Object.getOwnPropertyDescriptor(HTMLIFrameElement.prototype, "contentWindow").get;
Object.defineProperty(HTMLIFrameElement.prototype, "contentWindow", {
get: function () {
const contentWindow = contentWindowGetter.call(this);
const contentWindow = Reflect.apply(contentWindowGetter, this, arguments);
return new Proxy(contentWindow, {
get: function (obj, prop) {
if (prop === "localStorage") return null;
@ -23,8 +23,9 @@
}
});
// Prevent interception by patching of Function.prototype.call
Object.defineProperty(Function.prototype, "call", {value: Function.prototype.call, writable: false, configurable: false});
// Prevent interception by patching Reflect.apply and Function.prototype.bind
Object.defineProperty(Reflect, "apply", {value: Reflect.apply, writable: false, configurable: false});
Object.defineProperty(Function.prototype, "bind", {value: Function.prototype.bind, writable: false, configurable: false});
const oOpen = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function() {

2
js/main.min.js vendored

File diff suppressed because one or more lines are too long