mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-01-31 07:51:21 +01:00
innerHTML setter broke pages -> 0.5.9.1
This commit is contained in:
parent
ec3b7a9a26
commit
036c7cdbd0
@ -15,7 +15,6 @@
|
||||
|
||||
scope.protect = function protect(window, wrappedWindow, singleCallback, allCallback){
|
||||
|
||||
|
||||
[window.HTMLIFrameElement, window.HTMLFrameElement].forEach(function(constructor){
|
||||
var oldContentWindowGetter = constructor.prototype.__lookupGetter__("contentWindow");
|
||||
Object.defineProperty(
|
||||
@ -72,7 +71,10 @@
|
||||
"replaceWith"
|
||||
],
|
||||
getters: [],
|
||||
setters: ["innerHTML", "outerHTML"]
|
||||
setters: [
|
||||
"innerHTML",
|
||||
"outerHTML"
|
||||
]
|
||||
}
|
||||
].forEach(function(protectionDefinition){
|
||||
const object = protectionDefinition.object;
|
||||
@ -102,9 +104,11 @@
|
||||
});
|
||||
protectionDefinition.setters.forEach(function(property){
|
||||
const descriptor = Object.getOwnPropertyDescriptor(object, property);
|
||||
const setter = descriptor.set;
|
||||
const temp = eval(`({
|
||||
set ${property}(value){
|
||||
const ret = this.${property} = value;
|
||||
const ret = setter.call(this, value);
|
||||
// const ret = this.${property} = value;
|
||||
allCallback();
|
||||
return ret;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"name": "CanvasBlocker",
|
||||
"description": "__MSG_addon_description__",
|
||||
"version": "0.5.10",
|
||||
"version": "0.5.9.1",
|
||||
"icons": {
|
||||
"48": "icons/icon.svg",
|
||||
"96": "icons/icon.svg"
|
||||
|
Loading…
x
Reference in New Issue
Block a user