diff options
author | hackademix | 2018-09-03 19:20:39 +0200 |
---|---|---|
committer | hackademix | 2018-09-04 00:22:39 +0200 |
commit | 81ac052e1d1b0db924c9ef14a90bf22ce1dc4d8b (patch) | |
tree | 8e3f904e4cec2c0c8f6132dc0760994baae9fa65 /src/bg/RequestGuard.js | |
parent | 16cdbbe1cb7402ed795923128a4bc7bfb4415f1e (diff) | |
download | noscript-81ac052e1d1b0db924c9ef14a90bf22ce1dc4d8b.tar.gz noscript-81ac052e1d1b0db924c9ef14a90bf22ce1dc4d8b.tar.xz noscript-81ac052e1d1b0db924c9ef14a90bf22ce1dc4d8b.zip |
Better file: protocol support.
Diffstat (limited to 'src/bg/RequestGuard.js')
-rw-r--r-- | src/bg/RequestGuard.js | 12 |
1 files changed, 5 insertions, 7 deletions
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"), |