mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 04:26:35 +02:00
Trying to get wrappedJSObject of an wrappedJSObject is wrong...
Fixes #133 and #134.
This commit is contained in:
parent
42ee6e483e
commit
eb62521adc
4 changed files with 17 additions and 8 deletions
|
@ -15,6 +15,8 @@
|
|||
|
||||
const {changedFunctions, setRandomSupply} = require("./modifiedAPI");
|
||||
const randomSupplies = require("./randomSupplies");
|
||||
const getWrapped = require("sdk/getWrapped");
|
||||
|
||||
setRandomSupply(randomSupplies.nonPersistent);
|
||||
var apiNames = Object.keys(changedFunctions);
|
||||
var undef;
|
||||
|
@ -64,7 +66,7 @@
|
|||
changedFunction.object:
|
||||
[changedFunction.object]
|
||||
).forEach(function(object){
|
||||
var constructor = window.wrappedJSObject[object];
|
||||
var constructor = getWrapped(window)[object];
|
||||
if (constructor){
|
||||
var original = constructor.prototype[name];
|
||||
|
||||
|
@ -134,7 +136,7 @@
|
|||
case false:
|
||||
return undef;
|
||||
default:
|
||||
return exportFunction(fake, window.wrappedJSObject);
|
||||
return exportFunction(fake, getWrapped(window));
|
||||
}
|
||||
//case "block":
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue