fix customcss
This commit is contained in:
parent
1ac8706563
commit
455e181e45
|
@ -11,7 +11,7 @@
|
||||||
const contentWindowGetter = Object.getOwnPropertyDescriptor(HTMLIFrameElement.prototype, "contentWindow").get;
|
const contentWindowGetter = Object.getOwnPropertyDescriptor(HTMLIFrameElement.prototype, "contentWindow").get;
|
||||||
Object.defineProperty(HTMLIFrameElement.prototype, "contentWindow", {
|
Object.defineProperty(HTMLIFrameElement.prototype, "contentWindow", {
|
||||||
get: function () {
|
get: function () {
|
||||||
const contentWindow = contentWindowGetter.call(this);
|
const contentWindow = Reflect.apply(contentWindowGetter, this, arguments);
|
||||||
return new Proxy(contentWindow, {
|
return new Proxy(contentWindow, {
|
||||||
get: function (obj, prop) {
|
get: function (obj, prop) {
|
||||||
if (prop === "localStorage") return null;
|
if (prop === "localStorage") return null;
|
||||||
|
@ -23,8 +23,9 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Prevent interception by patching of Function.prototype.call
|
// Prevent interception by patching Reflect.apply and Function.prototype.bind
|
||||||
Object.defineProperty(Function.prototype, "call", {value: Function.prototype.call, writable: false, configurable: false});
|
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;
|
const oOpen = XMLHttpRequest.prototype.open;
|
||||||
XMLHttpRequest.prototype.open = function() {
|
XMLHttpRequest.prototype.open = function() {
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue