mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-01-08 20:54:49 +01:00
Changed the gathering of the require function in the frame script.
Fixes #94.
This commit is contained in:
parent
efb9e49ba3
commit
389adefef9
@ -4,10 +4,28 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
(function(){
|
(function(){
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const {utils: Cu} = Components;
|
const {utils: Cu} = Components;
|
||||||
const COMMONJS_URI = "resource://gre/modules/commonjs";
|
var chrome = {
|
||||||
const {require} = Cu.import(COMMONJS_URI + "/toolkit/require.js", {});
|
Cc: Components.classes,
|
||||||
|
Ci: Components.interfaces,
|
||||||
|
Cm: Components.manager,
|
||||||
|
Cr: Components.results,
|
||||||
|
Cu: Components.utils,
|
||||||
|
CC: Components.Constructor,
|
||||||
|
components: Components,
|
||||||
|
ChromeWorker: undefined
|
||||||
|
};
|
||||||
|
const { Loader, Require, unload, Module} = Components.utils.import('resource://gre/modules/commonjs/toolkit/loader.js');
|
||||||
|
var loader = Loader({
|
||||||
|
paths: {
|
||||||
|
"": "resource://gre/modules/commonjs/"
|
||||||
|
},
|
||||||
|
modules: {
|
||||||
|
"chrome": chrome
|
||||||
|
}
|
||||||
|
});
|
||||||
|
var requirer = Module("resource://canvasblocker-at-kkapsner-dot-de/data/frame.js", "./data/frame.js");
|
||||||
|
var require = Require(loader, requirer);
|
||||||
const {intercept} = require("../lib/intercept.js");
|
const {intercept} = require("../lib/intercept.js");
|
||||||
const {ask} = require("../lib/askForPermission.js");
|
const {ask} = require("../lib/askForPermission.js");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user