mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
Code linting.
This commit is contained in:
parent
cde71f8a62
commit
ef38abe545
24 changed files with 642 additions and 559 deletions
|
@ -1,5 +1,11 @@
|
|||
/* global settings exportFunction */
|
||||
/* 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/. */
|
||||
|
||||
window.scope = {};
|
||||
function require(module){
|
||||
"use strict";
|
||||
if (module.startsWith("./")){
|
||||
var scopeName = module.substr(2).replace(/\..+/, "");
|
||||
return window.scope[scopeName];
|
||||
|
@ -21,22 +27,21 @@ function require(module){
|
|||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
else if (module === "sdk/l10n"){
|
||||
return {
|
||||
get: function(key){
|
||||
return browser.i18n.getMessage(key);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
else if (module === "sdk/url"){
|
||||
return {
|
||||
URL
|
||||
}
|
||||
};
|
||||
}
|
||||
console.error("Not able to get non relative modules!", module);
|
||||
return undefined;
|
||||
throw new ReferenceError("Unable to get non relative module " + module + "!");
|
||||
}
|
||||
|
||||
window.scope.require = require;
|
Loading…
Add table
Add a link
Reference in a new issue