Browse Source
code review: fix error at extension console; allow recipes to override explicit rules
pull/2/head
Raymond Hill
7 years ago
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
3 changed files with
6 additions and
3 deletions
-
src/js/messaging.js
-
src/js/recipe-manager.js
-
src/js/storage.js
|
@ -97,6 +97,10 @@ function onMessage(request, sender, callback) { |
|
|
µm.reloadHostsFiles(); |
|
|
µm.reloadHostsFiles(); |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
case 'reloadRecipeFiles': |
|
|
|
|
|
µm.loadRecipes(true); |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
case 'setMatrixSwitch': |
|
|
case 'setMatrixSwitch': |
|
|
µm.tMatrix.setSwitch(request.switchName, '*', request.state); |
|
|
µm.tMatrix.setSwitch(request.switchName, '*', request.state); |
|
|
if ( µm.pMatrix.setSwitch(request.switchName, '*', request.state) ) { |
|
|
if ( µm.pMatrix.setSwitch(request.switchName, '*', request.state) ) { |
|
|
|
@ -175,12 +175,12 @@ |
|
|
if ( parts.length < 3 ) { continue; } |
|
|
if ( parts.length < 3 ) { continue; } |
|
|
let f2 = parts[2]; |
|
|
let f2 = parts[2]; |
|
|
let action = tMatrix.evaluateCellZXY(f0, f1, f2); |
|
|
let action = tMatrix.evaluateCellZXY(f0, f1, f2); |
|
|
if ( action === 1 ) { |
|
|
|
|
|
|
|
|
if ( (action & 3) === 1 ) { |
|
|
tMatrix.whitelistCell(f0, f1, f2); |
|
|
tMatrix.whitelistCell(f0, f1, f2); |
|
|
} |
|
|
} |
|
|
if ( details.commit !== true ) { continue; } |
|
|
if ( details.commit !== true ) { continue; } |
|
|
action = pMatrix.evaluateCellZXY(f0, f1, f2); |
|
|
action = pMatrix.evaluateCellZXY(f0, f1, f2); |
|
|
if ( action === 1 ) { |
|
|
|
|
|
|
|
|
if ( (action & 3) === 1 ) { |
|
|
pMatrix.whitelistCell(f0, f1, f2); |
|
|
pMatrix.whitelistCell(f0, f1, f2); |
|
|
mustPersist = true; |
|
|
mustPersist = true; |
|
|
} |
|
|
} |
|
|
|
@ -705,7 +705,6 @@ |
|
|
); |
|
|
); |
|
|
if ( recipesChanged ) { |
|
|
if ( recipesChanged ) { |
|
|
µm.recipeManager.reset(); |
|
|
µm.recipeManager.reset(); |
|
|
µm.loadRecipes(true); |
|
|
|
|
|
} |
|
|
} |
|
|
if ( typeof callback === 'function' ) { |
|
|
if ( typeof callback === 'function' ) { |
|
|
callback({ |
|
|
callback({ |
|
|