[Pkg-mozext-commits] [nostalgy] 60/252: allow Bcc:

David Prévot taffit at moszumanska.debian.org
Tue Jun 14 15:24:42 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository nostalgy.

commit b5aea2ad115fc1e96f31d1f9a22420fd348ffe62
Author: frisch <frisch at 56b81dcf-5a2f-0410-9db0-014be2e416ff>
Date:   Wed Mar 7 17:13:32 2007 +0000

    allow Bcc:
---
 CHANGES             |  1 +
 content/about.xhtml |  4 ++--
 content/composer.js | 35 +++++++++++++++++------------------
 3 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/CHANGES b/CHANGES
index 5150f2b..4bbab7f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,7 @@
 Since 0.2.1
   - bug fix: field choices in rules were not saved correctly
   - allows to match fields with regexps in rules
+  - allow to switch to "Bcc:" in the composer
 
 0.2.1
   - fix for recent TB builds  (ontextcommand -> ontextentered,
diff --git a/content/about.xhtml b/content/about.xhtml
index 61c02b4..a3c7772 100644
--- a/content/about.xhtml
+++ b/content/about.xhtml
@@ -135,8 +135,8 @@ uppercase, you don't need to press Shift.</p>
    <p>Nostalgy adds some support for keyboard operations to the Composer window.</p>
 
    <p>When typing in a header, it's possible to change easily the header
-to either "To:" or "Cc:". To do so, you need to be at the beginning
-of the input box, and simply type "to " or "cc " (with the whitespace,
+to either "To:", "Cc:" or "Bcc:". To do so, you need to be at the beginning
+of the input box, and simply type "to ", "cc " or "bcc " (with the whitespace,
 without the quotes).</p>
 
    <p>The Esc-Esc combination focuses the message body. The Esc-A combination
diff --git a/content/composer.js b/content/composer.js
index b54c906..4226405 100644
--- a/content/composer.js
+++ b/content/composer.js
@@ -3,24 +3,23 @@ function gEBI(s) { return document.getElementById(s); }
 var nostalgy_old_awRecipientKeyPress = 0;
 
 function nostalgy_awRecipientKeyPress(event, element) {
-  if (event.charCode == 32 && element.selectionStart == 2) {
-    var id = element.id;
-    if (id.match(/addressCol2#/)) {
-    var select = gEBI(id.replace(/addressCol2#/,"addressCol1#"));
-    var v = element.value;
-    var u = v.replace(/ >> .*/, "");
-    var f = v.substr(0,2);
-    if (f == "to" || f == "cc") {
-	select.value = "addr_" + f;
-	element.value = "";
-	setTimeout(function(){
-	  element.value = u.substr(2,u.length - 2);
- 	  element.selectionStart = 0; element.selectionEnd = 0;
-        }, 0);
-	event.stopPropagation();
-	return;
-    }
-    }
+  var id = element.id;
+  if (id.match(/addressCol2#/)) {
+  var select = gEBI(id.replace(/addressCol2#/,"addressCol1#"));
+  var v = element.value;
+  var u = v.replace(/ >> .*/, "");
+  var i = element.selectionStart;
+  var f = v.substr(0,i);
+  if (event.charCode == 32 && (f == "to" || f == "cc" || f == "bcc")) {
+    select.value = "addr_" + f;
+    element.value = "";
+    setTimeout(function(){
+      element.value = u.substr(i,u.length - i);
+      element.selectionStart = 0; element.selectionEnd = 0;
+    }, 0);
+    event.stopPropagation();
+    return;
+  }
   }
   nostalgy_old_awRecipientKeyPress(event, element);
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/nostalgy.git



More information about the Pkg-mozext-commits mailing list