How to overlay messengercompose.xul

Discussion about official Mozilla Thunderbird builds
Post Reply
fnaci4775
Posts: 3
Joined: July 27th, 2014, 9:36 am

How to overlay messengercompose.xul

Post by fnaci4775 »

Hi, i want to make a plugin to encript email text thunderbird. But first i need to know how to overlay messengercompose.xul to my xul page so i can have access to get message editor text.
Please help.. Thanks.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: How to overlay messengercompose.xul

Post by tanstaafl »

You could look at the source for the enigmail add-on. They faced the same problem you do. https://www.enigmail.net/download/source.php

Thunderbird has built-in S/MIME support and the Enigmail add-on uses OpenPGP. There is also a WebPG add-on that provides GnuPG/PGP related functions to Thunderbird. Out of curiosity what type of encryption do you plan to use and why are you doing this rather than using an existing solution?
fnaci4775
Posts: 3
Joined: July 27th, 2014, 9:36 am

Re: How to overlay messengercompose.xul

Post by fnaci4775 »

I want to implement El Gamal Encryption. This work is for my degree.

I already success to encrypt message text from messagePane. Now i need to encrypt the attachment from messagecompose. But i can't get the attachment from attachment list.
I search from google, and find this

var bucket = document.getElementById("attachmentBucket");
var attachments = bucket.childNodes;
var filepath = attachments[i].attachment.url;
var protocolhandler = Components.classes["@mozilla.org/network/protocol;1?name=file"].createInstance(Components.interfaces.nsIFileProtocolHandler);
alert("SAD");
var file = protocolhandler.getFileFromURLSpec(filepath);

But didn't work.
Do you have any solution?
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: How to overlay messengercompose.xul

Post by tanstaafl »

viewtopic.php?f=19&t=154698

I suggest you ask for help in the Extension Development forum.
Post Reply