diff options
author | hackademix | 2019-03-27 23:43:34 +0100 |
---|---|---|
committer | hackademix | 2019-03-27 23:43:34 +0100 |
commit | b9373c65b112342a519cb932fdebfd68a3cd174d (patch) | |
tree | c7da79232c02645389ae00d3ddbc59c0919ae0be /src/ui | |
parent | d77df5c9e433a2e08f1e66ded36beca5e17deff3 (diff) | |
parent | 0878ad2b0a0d3af5db66cc6a4f7d882e17a13365 (diff) | |
download | noscript-b9373c65b112342a519cb932fdebfd68a3cd174d.tar.gz noscript-b9373c65b112342a519cb932fdebfd68a3cd174d.tar.xz noscript-b9373c65b112342a519cb932fdebfd68a3cd174d.zip |
Merge branch 'chromium' into merge/chromium
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/Prompts.js | 10 | ||||
-rw-r--r-- | src/ui/options.css | 8 | ||||
-rw-r--r-- | src/ui/options.html | 2 | ||||
-rw-r--r-- | src/ui/options.js | 2 | ||||
-rw-r--r-- | src/ui/popup.css | 4 | ||||
-rw-r--r-- | src/ui/popup.html | 2 | ||||
-rw-r--r-- | src/ui/prompt.html | 2 | ||||
-rw-r--r-- | src/ui/siteInfo.html | 2 | ||||
-rw-r--r-- | src/ui/toolbar.js | 2 | ||||
-rw-r--r-- | src/ui/ui-hc.css | 4 | ||||
-rw-r--r-- | src/ui/ui.css | 11 |
11 files changed, 42 insertions, 7 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) { diff --git a/src/ui/options.css b/src/ui/options.css index 6e6eec7..ca64859 100644 --- a/src/ui/options.css +++ b/src/ui/options.css @@ -195,3 +195,11 @@ input[type="file"] { border-radius: .2em .2em 0 0; padding: .2em .4em; } + +#xss-options { + display: none; +} + +.mozwebext #xss-options { + display: block; +} diff --git a/src/ui/options.html b/src/ui/options.html index 9ffaa69..dbf1e15 100644 --- a/src/ui/options.html +++ b/src/ui/options.html @@ -8,6 +8,8 @@ <link rel="stylesheet" href="/lib/flextabs.css" /> <link rel="stylesheet" href="options.css" /> <link rel="stylesheet" href="whirlpool.css" /> +<script src="/lib/UA.js"></script> +<script src="/lib/browser-polyfill.js"></script> <script src="/lib/include.js"></script> <script src="/lib/log.js"></script> <script src="/lib/flextabs.js"></script> diff --git a/src/ui/options.js b/src/ui/options.js index 1932269..2a52a82 100644 --- a/src/ui/options.js +++ b/src/ui/options.js @@ -103,7 +103,7 @@ } let button = document.querySelector("#btn-delete-xss-choices"); let choices = UI.xssUserChoices; - button.disabled = Object.keys(choices).length === 0; + button.disabled = !choices || Object.keys(choices).length === 0; button.onclick = () => { UI.updateSettings({ xssUserChoices: {} diff --git a/src/ui/popup.css b/src/ui/popup.css index ce96023..a463905 100644 --- a/src/ui/popup.css +++ b/src/ui/popup.css @@ -16,6 +16,7 @@ body { #top a { appearance: none !important; + webkit-appearance: none !important; -moz-appearance: none !important; width: 2em; height: 2em; @@ -119,8 +120,9 @@ body { } .hider-close { - -moz-appearance: none; appearance: none; + -webkit-appearance: none; + -moz-appearance: none; color: black; background: transparent; padding: 0; diff --git a/src/ui/popup.html b/src/ui/popup.html index 517b233..5efc9e9 100644 --- a/src/ui/popup.html +++ b/src/ui/popup.html @@ -6,6 +6,8 @@ <title>NoScript Settings</title> <meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="popup.css" /> +<script src="/lib/UA.js"></script> +<script src="/lib/browser-polyfill.js"></script> <script src="/lib/include.js"></script> <script src="/lib/log.js"></script> <script src="/common/locale.js"></script> diff --git a/src/ui/prompt.html b/src/ui/prompt.html index 431b920..7761128 100644 --- a/src/ui/prompt.html +++ b/src/ui/prompt.html @@ -5,6 +5,8 @@ <title></title> <meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="prompt.css" /> +<script src="/lib/UA.js"></script> +<script src="/lib/browser-polyfill.js"></script> <script src="/lib/include.js"></script> <script src="/lib/log.js"></script> <script src="/common/locale.js"></script> diff --git a/src/ui/siteInfo.html b/src/ui/siteInfo.html index 0cb24ec..c37fb53 100644 --- a/src/ui/siteInfo.html +++ b/src/ui/siteInfo.html @@ -1,5 +1,7 @@ <!DOCTYPE html> <meta charset="utf-8"> +<script src="/lib/UA.js"></script> +<script src="/lib/browser-polyfill.js"></script> <script src="/lib/log.js"></script> <script src="/lib/include.js"></script> <script src="siteInfo.js"></script> diff --git a/src/ui/toolbar.js b/src/ui/toolbar.js index d2a2f6e..df3515e 100644 --- a/src/ui/toolbar.js +++ b/src/ui/toolbar.js @@ -87,7 +87,7 @@ } UI.local.toolbarLayout = { left, right, - hidden: Array.map(document.querySelectorAll("#top > .hider > .icon"), el => el.id), + hidden: Array.from(document.querySelectorAll("#top > .hider > .icon")).map(el => el.id), }; debug("%o", UI.local); diff --git a/src/ui/ui-hc.css b/src/ui/ui-hc.css index 2db0a5b..0978458 100644 --- a/src/ui/ui-hc.css +++ b/src/ui/ui-hc.css @@ -5,10 +5,14 @@ input { } input[type="radio"] { + appearance: radio !important; + -webkit-appearance: radio !important; -moz-appearance: radio !important; padding-right: .2em !important; } input[type="checkbox"] { + appearance: checkbox !important; + -webkit-appearance: checkbox !important; -moz-appearance: checkbox !important; } diff --git a/src/ui/ui.css b/src/ui/ui.css index f59646a..1d40030 100644 --- a/src/ui/ui.css +++ b/src/ui/ui.css @@ -3,6 +3,7 @@ body { font-family: sans-serif; font: -moz-use-system-font; font-size: 12px; + min-width: 600px; } .mobile > body { @@ -139,6 +140,8 @@ input[type="checkbox"] { input.https-only { font-size: 1em; + appearance: none; + -webkit-appearance: none; -moz-appearance: none; background: url(/img/ui-http64.png) no-repeat center; background-size: 1.5em; @@ -186,6 +189,8 @@ span.preset { .presets input.preset { font-size: 1em; + appearance: none; + -webkit-appearance: none; -moz-appearance: none; background: url(/img/ui-no64.png) no-repeat center left; background-size: 1.5em; @@ -264,6 +269,8 @@ input.preset:active, input.preset:focus, input.preset:hover { } button.options { + appearance: none; + -webkit-appearance: none; -moz-appearance: none; border: none; background: none transparent; @@ -276,6 +283,8 @@ button.options { } .preset .options { + appearance: none; + -webkit-appearance: none; -moz-appearance: none; border: 0; @@ -315,6 +324,8 @@ input.preset[value="CUSTOM"] { input.temp { font-size: 1em; + appearance: none; + -webkit-appearance: none; -moz-appearance: none; margin: 0; padding: 0; |