mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-01-18 09:28:52 +01:00
Direct access to exportFunction in intercept.js
This commit is contained in:
parent
a2fa00fb98
commit
dc98a92e8f
@ -8,8 +8,7 @@
|
|||||||
const {utils: Cu} = Components;
|
const {utils: Cu} = Components;
|
||||||
const COMMONJS_URI = "resource://gre/modules/commonjs";
|
const COMMONJS_URI = "resource://gre/modules/commonjs";
|
||||||
const {require} = Cu.import(COMMONJS_URI + "/toolkit/require.js", {});
|
const {require} = Cu.import(COMMONJS_URI + "/toolkit/require.js", {});
|
||||||
const {intercept, setExportFunction} = require("../lib/intercept.js");
|
const {intercept} = require("../lib/intercept.js");
|
||||||
setExportFunction(Cu.exportFunction);
|
|
||||||
const {ask} = require("../lib/askForPermission.js");
|
const {ask} = require("../lib/askForPermission.js");
|
||||||
|
|
||||||
// Variable to "unload" the script
|
// Variable to "unload" the script
|
||||||
|
@ -10,8 +10,7 @@
|
|||||||
setRandomSupply(randomSupplies.nonPersistent);
|
setRandomSupply(randomSupplies.nonPersistent);
|
||||||
var apiNames = Object.keys(changedFunctions);
|
var apiNames = Object.keys(changedFunctions);
|
||||||
var undef;
|
var undef;
|
||||||
var exportFunction;
|
var exportFunction = require("chrome").Cu.exportFunction;
|
||||||
|
|
||||||
function setRandomSupplyByType(type){
|
function setRandomSupplyByType(type){
|
||||||
switch (type){
|
switch (type){
|
||||||
case "persistent":
|
case "persistent":
|
||||||
@ -74,7 +73,4 @@
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
exports.setExportFunction = function(eFunc){
|
|
||||||
exportFunction = eFunc;
|
|
||||||
};
|
|
||||||
}());
|
}());
|
Loading…
x
Reference in New Issue
Block a user