From 81ac052e1d1b0db924c9ef14a90bf22ce1dc4d8b Mon Sep 17 00:00:00 2001 From: hackademix Date: Mon, 3 Sep 2018 19:20:39 +0200 Subject: Better file: protocol support. --- src/bg/main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/bg/main.js') diff --git a/src/bg/main.js b/src/bg/main.js index 58e7aef..9976f8f 100644 --- a/src/bg/main.js +++ b/src/bg/main.js @@ -141,8 +141,9 @@ return await Settings.import(data); }, - async fetchChildPolicy({url, contextUrl}) { - return ChildPolicies.getForDocument(ns.policy, url, contextUrl); + async fetchChildPolicy({url, contextUrl}, sender) { + return ChildPolicies.getForDocument(ns.policy, + url || sender.url, contextUrl || sender.tab.url); }, async openStandalonePopup() { -- cgit v1.2.3