This saves pressing enter to confirm the selection.
---
 modules/extensions/noscript.js |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/extensions/noscript.js b/modules/extensions/noscript.js
index 6f699b0..97bd895 100644
--- a/modules/extensions/noscript.js
+++ b/modules/extensions/noscript.js
@@ -73,7 +73,7 @@ function setObjectVisibility(document, callback) {
 function ns_allow_temp(url, buffer, P, allow) {
     var enabled, temp;
     const ns = noscript_service;
-    if (allow == "Y" || allow == "y" || allow == "yes" || allow == "Yes") {
+    if (allow) {
         enabled = true;
         temp = ns.getPref("toggle.temp");
         ns.setTemp(url, enabled && temp);
@@ -109,7 +109,9 @@ interactive("ns-toggle-temp", "Allow a site temporary 
access to javascript",   f
         urls = urls.filter(function (u) { return !ns.isJSEnabled(u); });
         while ((url2 = urls.pop())) {
             ns_allow_temp(url2, I.buffer, I.P,
-                          (yield I.minibuffer.read($prompt = "Allow "+url2+"? 
[Y/[N]]")));
+                          (yield I.minibuffer.read_single_character_option(
+                              $prompt = "Allow " + url2 + "? [y/[n]]",
+                              $options = ["y", "n"])) == "y");
         }
         reload(I.buffer, I.P);
     }
-- 
1.7.7

_______________________________________________
Conkeror mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/conkeror

Reply via email to