mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
Big linting
This commit is contained in:
parent
b5e6d049ce
commit
aef6bd3d59
58 changed files with 2074 additions and 1856 deletions
|
@ -10,14 +10,14 @@ const require = function(){
|
|||
const scope = window.scope;
|
||||
|
||||
function getScopeName(module){
|
||||
var scopeName = module.replace(/^\..*\//, "").replace(/\..+/, "");
|
||||
const scopeName = module.replace(/^\..*\//, "").replace(/\..+/, "");
|
||||
// console.log(scopeName);
|
||||
return scopeName;
|
||||
}
|
||||
|
||||
function require(module){
|
||||
if (module.startsWith(".")){
|
||||
var scopeName = getScopeName(module);
|
||||
const scopeName = getScopeName(module);
|
||||
return scope[scopeName];
|
||||
}
|
||||
throw new ReferenceError("Unable to get non relative module " + module + "!");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue