diff options
Diffstat (limited to 'src/bg')
-rw-r--r-- | src/bg/main.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/bg/main.js b/src/bg/main.js index d220274..919c971 100644 --- a/src/bg/main.js +++ b/src/bg/main.js @@ -42,9 +42,15 @@ if (policyData && policyData.DEFAULT) { ns.policy = new Policy(policyData); } else { - await include("/legacy/Legacy.js"); - ns.policy = await Legacy.createOrMigratePolicy(); - await ns.savePolicy(); + let managedData = await Storage.get("managed", "defaultSettings"); + if (managedData != null) { + let defaultSettings = JSON.parse(managedData.defaultSettings); + ns.policy = new Policy(defaultSettings.policy); + } else { + await include("/legacy/Legacy.js"); + ns.policy = await Legacy.createOrMigratePolicy(); + await ns.savePolicy(); + } } Sites.onionSecure = ns.local.isTorBrowser; |