diff options
Diffstat (limited to 'background')
-rw-r--r-- | background/page_actions_server.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/background/page_actions_server.js b/background/page_actions_server.js index b0db5f5..e21ca6e 100644 --- a/background/page_actions_server.js +++ b/background/page_actions_server.js @@ -25,15 +25,19 @@ let policy_observable; function send_actions(url, port) { - let [pattern, settings] = query_best(storage, url); - if (!settings) - settings = {allow: policy_observable && policy_observable.value}; + const [pattern, queried_settings] = query_best(storage, url); + + const settings = {allow: policy_observable && policy_observable.value}; + Object.assign(settings, queried_settings); + if (settings.components) + settings.allow = false; + const repos = storage.get_all(TYPE_PREFIX.REPO); port.postMessage(["settings", [pattern, settings, repos]]); - let components = settings.components; - let processed_bags = new Set(); + const components = settings.components; + const processed_bags = new Set(); if (components !== undefined) send_scripts([components], port, processed_bags); |