diff options
author | hackademix | 2019-02-01 00:28:33 +0100 |
---|---|---|
committer | hackademix | 2019-02-01 00:28:33 +0100 |
commit | 781514cfb946fb49bc1e2c52f16f808f26856f41 (patch) | |
tree | fb1e23838f73b6330d769d2f7417a7cfc78981c1 /src/ui | |
parent | d076a517ba97da60791ded641a7952a784203d59 (diff) | |
download | noscript-781514cfb946fb49bc1e2c52f16f808f26856f41.tar.gz noscript-781514cfb946fb49bc1e2c52f16f808f26856f41.tar.xz noscript-781514cfb946fb49bc1e2c52f16f808f26856f41.zip |
Graceful degradation for missing WebExtensions APIs on Chromium.
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/Prompts.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ui/Prompts.js b/src/ui/Prompts.js index 03ea9ee..ed83ac2 100644 --- a/src/ui/Prompts.js +++ b/src/ui/Prompts.js @@ -7,14 +7,16 @@ var Prompts = (() => { async open(data) { promptData = data; this.close(); - this.currentWindow = await browser.windows.create({ + let options = { url: browser.extension.getURL("ui/prompt.html"), type: "panel", - allowScriptsToClose: true, - // titlePreface: "NoScript ", width: data.features.width, height: data.features.height, - }); + }; + if (UA.isMozilla) { + options.allowScriptsToClose = true; + } + this.currentWindow = await browser.windows.create(options); } async close() { if (this.currentWindow) { |