mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
Simplified require and further linting.
This commit is contained in:
parent
01c1145e28
commit
dcb878392e
15 changed files with 86 additions and 78 deletions
|
@ -1,4 +1,3 @@
|
|||
/* 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/. */
|
||||
|
@ -10,11 +9,6 @@ function require(module){
|
|||
var scopeName = module.substr(2).replace(/\..+/, "");
|
||||
return window.scope[scopeName];
|
||||
}
|
||||
else if (module === "chrome"){
|
||||
return {
|
||||
Cu: {exportFunction}
|
||||
};
|
||||
}
|
||||
else if (module === "sdk/simple-prefs"){
|
||||
return {
|
||||
prefs: settings,
|
||||
|
@ -29,18 +23,6 @@ function require(module){
|
|||
}
|
||||
};
|
||||
}
|
||||
else if (module === "sdk/l10n"){
|
||||
return {
|
||||
get: function(key){
|
||||
return browser.i18n.getMessage(key);
|
||||
}
|
||||
};
|
||||
}
|
||||
else if (module === "sdk/url"){
|
||||
return {
|
||||
URL
|
||||
};
|
||||
}
|
||||
throw new ReferenceError("Unable to get non relative module " + module + "!");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue