mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2024-12-22 12:50:36 +01:00
Removed remaining sdk shortcut module
This commit is contained in:
parent
ef4e238b94
commit
f8f35890a1
@ -9,7 +9,7 @@
|
||||
const {ask} = require("./askForPermission.js");
|
||||
const lists = require("./lists.js");
|
||||
const {check: originalCheck, checkStack: originalCheckStack} = require("./check.js");
|
||||
const getWrapped = require("sdk/getWrapped");
|
||||
const {getWrapped} = require("./modifiedAPIFunctions");
|
||||
const extension = require("./extension");
|
||||
|
||||
const logging = require("./logging");
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
const {changedFunctions, changedGetters, setRandomSupply} = require("./modifiedAPI");
|
||||
const randomSupplies = require("./randomSupplies");
|
||||
const getWrapped = require("sdk/getWrapped");
|
||||
const {getWrapped} = require("./modifiedAPIFunctions");
|
||||
const logging = require("./logging");
|
||||
const settings = require("./settings");
|
||||
const extension = require("./extension");
|
||||
|
@ -12,6 +12,21 @@
|
||||
scope = require.register("./modifiedAPIFunctions", {});
|
||||
}
|
||||
|
||||
scope.getWrapped = function getWrapped(obj){
|
||||
if (!obj){
|
||||
return obj;
|
||||
}
|
||||
var wrapped;
|
||||
try {
|
||||
wrapped = obj.wrappedJSObject || obj;
|
||||
}
|
||||
catch (e){
|
||||
require("./logging").error("getWrapped failed for", obj, ":", e);
|
||||
wrapped = obj;
|
||||
}
|
||||
return wrapped;
|
||||
};
|
||||
|
||||
scope.checkerWrapper = function checkerWrapper(checker, object, args, callback){
|
||||
const check = checker.call(object);
|
||||
if (check.allow){
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
const logging = require("./logging");
|
||||
const {sha256String: hashing} = require("./hash");
|
||||
const getWrapped = require("sdk/getWrapped");
|
||||
const {checkerWrapper} = require("./modifiedAPIFunctions");
|
||||
|
||||
var randomSupply = null;
|
||||
|
@ -15,8 +15,7 @@
|
||||
const colorStatistics = require("./colorStatistics");
|
||||
const logging = require("./logging");
|
||||
const {copyCanvasToWebgl} = require("./webgl");
|
||||
const getWrapped = require("sdk/getWrapped");
|
||||
const {checkerWrapper} = require("./modifiedAPIFunctions");
|
||||
const {getWrapped, checkerWrapper} = require("./modifiedAPIFunctions");
|
||||
|
||||
var randomSupply = null;
|
||||
|
||||
|
@ -12,9 +12,8 @@
|
||||
scope = require.register("./modifiedDOMRectAPI", {});
|
||||
}
|
||||
|
||||
const {checkerWrapper, setProperties: setProperties} = require("./modifiedAPIFunctions");
|
||||
const {getWrapped, checkerWrapper, setProperties: setProperties} = require("./modifiedAPIFunctions");
|
||||
const {byteArrayToString: hash} = require("./hash");
|
||||
const getWrapped = require("sdk/getWrapped");
|
||||
|
||||
|
||||
var randomSupply = null;
|
||||
|
@ -19,22 +19,6 @@ const require = function(){
|
||||
var scopeName = getScopeName(module);
|
||||
return scope[scopeName];
|
||||
}
|
||||
else if (module === "sdk/getWrapped"){
|
||||
return function getWrapped(obj){
|
||||
if (!obj){
|
||||
return obj;
|
||||
}
|
||||
var wrapped;
|
||||
try {
|
||||
wrapped = obj.wrappedJSObject || obj;
|
||||
}
|
||||
catch (e){
|
||||
require("./logging").error("getWrapped failed for", obj, ":", e);
|
||||
wrapped = obj;
|
||||
}
|
||||
return wrapped;
|
||||
};
|
||||
}
|
||||
throw new ReferenceError("Unable to get non relative module " + module + "!");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user