[Conkeror] [PATCH] Option for control click to open new buffer.

Michael Dagitses dagitses at google.com
Fri Apr 17 11:28:14 PDT 2009


Adding user variable to clicks-in-new-buffer to allow for control-clicking to
open new buffers.  This is to more closely mirror how firefox opens new tabs.
---
 modules/clicks-in-new-buffer.js |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/modules/clicks-in-new-buffer.js b/modules/clicks-in-new-buffer.js
index afbd7f8..a8912c7 100644
--- a/modules/clicks-in-new-buffer.js
+++ b/modules/clicks-in-new-buffer.js
@@ -9,6 +9,10 @@ define_variable("clicks_in_new_buffer_button", 1,
                 "Which mouse button should open links in a new buffer. " +
                 "0 = left, 1 = middle, 2 = right. Default is 1.");
 
+define_variable('clicks_in_new_buffer_require_control', false,
+                'Whether control must be held to open in new buffer.  ' +
+                'Default is false.');
+
 define_variable("clicks_in_new_buffer_target", OPEN_NEW_BUFFER,
                 "How to open links in a new buffer, in the foreground or " +
                 "the background. Set to one the constants OPEN_NEW_BUFFER " +
@@ -32,7 +36,8 @@ function find_tag_in_parents(tag, element) {
 }
 
 function open_link_in_new_buffer(event) {
-    if (event.button != clicks_in_new_buffer_button)
+    if (event.button != clicks_in_new_buffer_button ||
+        event.ctrlKey != clicks_in_new_buffer_require_control)
         return;
     let element = event.target;
     let anchor = null;
-- 
1.5.4.3



More information about the Conkeror mailing list