diff --git a/lib/iframeProtection.js b/lib/iframeProtection.js index 8b9b374..09bfcd1 100644 --- a/lib/iframeProtection.js +++ b/lib/iframeProtection.js @@ -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; } diff --git a/manifest.json b/manifest.json index 88c1dcc..2e64411 100644 --- a/manifest.json +++ b/manifest.json @@ -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"