1
0
Fork 0
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:
kkapsner 2017-10-06 16:06:31 +02:00
parent 01c1145e28
commit dcb878392e
15 changed files with 86 additions and 78 deletions

View file

@ -14,13 +14,11 @@
}
const lists = require("./lists");
const preferences = require("sdk/simple-prefs");
const prefs = preferences.prefs;
const {parseErrorStack} = require("./callingStack");
const logging = require("./logging");
scope.check = function check({url, errorStack}){
var match = checkBoth(errorStack, url, prefs.blockMode).match(
var match = checkBoth(errorStack, url, settings.blockMode).match(
/^(block|allow|fake|ask)(|Readout|Everything|Context|Input|Internal)$/
);
if (match){
@ -41,7 +39,7 @@
};
function checkBoth(errorStack, url, blockMode){
if (prefs.enableStackList && errorStack && checkStack(errorStack)){
if (settings.enableStackList && errorStack && checkStack(errorStack)){
return "allow";
}
else {