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
|
@ -13,14 +13,10 @@
|
|||
scope = window.scope.callingStack;
|
||||
}
|
||||
|
||||
const preferences = require("sdk/simple-prefs");
|
||||
const prefs = preferences.prefs;
|
||||
|
||||
// Translation
|
||||
var translate = require("sdk/l10n").get;
|
||||
var _ = function(name, replace, translateAPI){
|
||||
if (!translateAPI){
|
||||
translateAPI = translate;
|
||||
translateAPI = browser.i18n.getMessage;
|
||||
}
|
||||
|
||||
var str = translateAPI(name) || name;
|
||||
|
@ -76,7 +72,7 @@
|
|||
toString: function(translateAPI){
|
||||
var msg = "";
|
||||
msg += "\n\n" + _("sourceOutput", undefined, translateAPI) + ": ";
|
||||
if (prefs.showCompleteCallingStack){
|
||||
if (settings.showCompleteCallingStack){
|
||||
msg += callers.reduce(function(stack, c){
|
||||
return stack + "\n\t" + _("stackEntryOutput", c, translateAPI);
|
||||
}, "");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue