mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
Cleanup require system
This commit is contained in:
parent
11b8ddfcc8
commit
574efa23e7
35 changed files with 45 additions and 67 deletions
|
@ -1,7 +1,7 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
(function(){
|
||||
(function(require){
|
||||
"use strict";
|
||||
|
||||
var scope;
|
||||
|
@ -9,8 +9,7 @@
|
|||
scope = exports;
|
||||
}
|
||||
else {
|
||||
scope = {};
|
||||
window.scope.settings = scope;
|
||||
scope = require.register("./settings", {});
|
||||
}
|
||||
|
||||
const logging = require("./logging");
|
||||
|
@ -428,8 +427,8 @@
|
|||
initEvents.forEach(function(callback){callback();});
|
||||
return true;
|
||||
};
|
||||
if (window.scope.settingsData){
|
||||
scope.init(window.scope.settingsData);
|
||||
if (require.exists("./settingsData")){
|
||||
scope.init(require("./settingsData"));
|
||||
scope.loaded = Promise.resolve(false);
|
||||
}
|
||||
else {
|
||||
|
@ -468,4 +467,4 @@
|
|||
Object.seal(scope);
|
||||
|
||||
require.emit("./settings");
|
||||
}());
|
||||
}(require));
|
Loading…
Add table
Add a link
Reference in a new issue