Close UI and reload immediately when enabling global/tab restrictions or disabling them for the tab only.
This commit is contained in:
parent
41f9fcb8f4
commit
804782ef0c
|
@ -195,6 +195,11 @@ addEventListener("unload", e => {
|
||||||
this.disabled = true;
|
this.disabled = true;
|
||||||
policy.enforced = !pressed;
|
policy.enforced = !pressed;
|
||||||
await UI.updateSettings({policy, reloadAffected: false});
|
await UI.updateSettings({policy, reloadAffected: false});
|
||||||
|
if (policy.enforced || UI.local.immediateUnrestrict) {
|
||||||
|
reload();
|
||||||
|
close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
setupEnforcement();
|
setupEnforcement();
|
||||||
pendingReload(true);
|
pendingReload(true);
|
||||||
};
|
};
|
||||||
|
@ -216,6 +221,11 @@ addEventListener("unload", e => {
|
||||||
reloadAffected: false,
|
reloadAffected: false,
|
||||||
});
|
});
|
||||||
UI.unrestrictedTab = pressed;
|
UI.unrestrictedTab = pressed;
|
||||||
|
if (!(UI.unrestrictedTab && UI.local.stickyUnrestrictedTab)) {
|
||||||
|
reload();
|
||||||
|
close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
setupEnforcement();
|
setupEnforcement();
|
||||||
pendingReload(true);
|
pendingReload(true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue