Skip to content

Commit

Permalink
autoselect
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.getfiregpg.org/firegpg@257 1e1cc2a3-b62a-0410-bc93-fb3b3b0a0737
  • Loading branch information
theglu committed Jun 13, 2007
1 parent 9e95cb5 commit 55f69f1
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 6 deletions.
5 changes: 4 additions & 1 deletion ChangeLog
@@ -1,6 +1,9 @@
2007-06-13 Maximilien Cuony
* Find the news mails content in cgmail (but a bit experimental)

2007-06-12 Maximilien Cuony
* Autoselect the recipants for crypt in gmail !

2007-06-12 Achraf cherti
* some orthography/grammar errors are fixed in the french/english locales.
* translation of some untranslated strings in en-US locale (it was in French)
Expand Down
35 changes: 30 additions & 5 deletions content/cgmail.js
Expand Up @@ -544,9 +544,35 @@ var cGmail = {

if (select2 == "")
{
var i18n = document.getElementById("firegpg-strings");
alert(i18n.getString("gmailSelectError"));
return "";

//Ok, we try now to get all content
try { var select = dDocument.getElementById('hc_' + idMail).contentWindow.document.body.innerHTML; }
catch (e) { var select = ""; }

if ( select != "")
{

var indexOfQuote = select.indexOf('<span class="gmail_quote">');

contenuMail = Selection.wash(select.substring(0,indexOfQuote));

}
else
{
var textarera = dDocument.getElementById('ta_' + idMail);
select2 = textarera.value;

var indexOfQuote = select2.indexOf("\n> ");
select2 = select2.substring(0,indexOfQuote);

indexOfQuote = select2.lastIndexOf("\n");
contenuMail = Selection.wash(select2.substring(0,indexOfQuote));

}
//var i18n = document.getElementById("firegpg-strings");
//alert(i18n.getString("gmailSelectError"));
//return "";

}
else
{
Expand All @@ -564,11 +590,10 @@ var cGmail = {
var s = new XMLSerializer();
var d = documentFragment;
var str = s.serializeToString(d);

alert(str);
contenuMail = Selection.wash(str);

}

return contenuMail;
},

Expand Down

0 comments on commit 55f69f1

Please sign in to comment.