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/RequestGuard.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/bg/RequestGuard.js') diff --git a/src/bg/RequestGuard.js b/src/bg/RequestGuard.js index 5dea994..b585935 100644 --- a/src/bg/RequestGuard.js +++ b/src/bg/RequestGuard.js @@ -177,14 +177,12 @@ var RequestGuard = (() => { let {siteKey} = Sites.parse(url); let options; if (siteKey === origin) { - TAG += `@${siteKey}`; - } else { - options = [ - {label: _("allowLocal", siteKey), checked: true}, - {label: _("allowLocal", origin)} - ]; + origin = new URL(url).protocol; } - // let parsedDoc = Sites.parse(documentUrl); + options = [ + {label: _("allowLocal", siteKey), checked: true}, + {label: _("allowLocal", origin)} + ]; let t = u => `${TAG}@${u}`; let ret = await Prompts.prompt({ title: _("BlockedObjects"), -- cgit v1.2.3