mirror of
https://github.com/gorhill/uMatrix.git
synced 2024-05-19 03:33:17 +12:00
code review: fix error at extension console; allow recipes to override explicit rules
This commit is contained in:
parent
4e00e6e3b0
commit
51a68683f8
|
@ -97,6 +97,10 @@ function onMessage(request, sender, callback) {
|
|||
µm.reloadHostsFiles();
|
||||
break;
|
||||
|
||||
case 'reloadRecipeFiles':
|
||||
µm.loadRecipes(true);
|
||||
break;
|
||||
|
||||
case 'setMatrixSwitch':
|
||||
µm.tMatrix.setSwitch(request.switchName, '*', request.state);
|
||||
if ( µm.pMatrix.setSwitch(request.switchName, '*', request.state) ) {
|
||||
|
|
|
@ -175,12 +175,12 @@
|
|||
if ( parts.length < 3 ) { continue; }
|
||||
let f2 = parts[2];
|
||||
let action = tMatrix.evaluateCellZXY(f0, f1, f2);
|
||||
if ( action === 1 ) {
|
||||
if ( (action & 3) === 1 ) {
|
||||
tMatrix.whitelistCell(f0, f1, f2);
|
||||
}
|
||||
if ( details.commit !== true ) { continue; }
|
||||
action = pMatrix.evaluateCellZXY(f0, f1, f2);
|
||||
if ( action === 1 ) {
|
||||
if ( (action & 3) === 1 ) {
|
||||
pMatrix.whitelistCell(f0, f1, f2);
|
||||
mustPersist = true;
|
||||
}
|
||||
|
|
|
@ -705,7 +705,6 @@
|
|||
);
|
||||
if ( recipesChanged ) {
|
||||
µm.recipeManager.reset();
|
||||
µm.loadRecipes(true);
|
||||
}
|
||||
if ( typeof callback === 'function' ) {
|
||||
callback({
|
||||
|
|
Loading…
Reference in a new issue