1

Topic: (JavaScript-)API for FireGPG?

Hello!

First of all: Thanks for this wonderful Addon!

I would like to integrate FireGPG into my webmail-software "yawebmail"
(http://yawebmail.sourceforge.net/). Is there a (JavaScript-)API to FireGPG,
so I can integrate some buttons into my pages which call specific FireGPG-
functions?

If not, how can I help to enable FireGPG to integrate into yawebmail?
(I'm no (Firefox-)plugin-programmer).

Thanks a lot in advance!

Best regards
Stephan

Re: (JavaScript-)API for FireGPG?

Hi !

First of all: Thanks for this wonderful Addon!
I would like to integrate FireGPG into my webmail-software "yawebmail"
(http://yawebmail.sourceforge.net/). Is there a (JavaScript-)API to FireGPG,
so I can integrate some buttons into my pages which call specific FireGPG-
functions?

First, download the source code :

svn co svn://svn.tuxfamily.org/svnroot/firegpg/firegpg

And see GMail's webmail class. It's in content/cgmail.js.

If not, how can I help to enable FireGPG to integrate into yawebmail?
(I'm no (Firefox-)plugin-programmer).

It's not difficult ^_^ (http://developer.mozilla.org is your friend).

(and... thanks for your futur contribution)

Re: (JavaScript-)API for FireGPG?

Hello again,

I got myself the FireGPGs sourcecode and added the sourcecode-folder to firefox-addons as described in the README-file.

Under http://developer.mozilla.org I learned how the addon fires up:

- In chrome.manifest you "overwrite" browser.xul with firefoxOverlay.xul
- firefoxOverlay.xul loads the JavaScript-files in the "content"-folder
- in "overlay.js" the
  window.addEventListener("load", function(e) { firegpg.onLoad(e); }, false);
  fires up FireGPG when a window is loaded.

But now im stucked. How does FireGPG determine that the "GMail -> create eMail"-page is loaded?
I found this in "cgmail.js":

            // If it's the page with a GMail message
            if(aProgress.DOMWindow.document.getElementById('msg_0') != null || aProgress.DOMWindow.document.getElementById('msgs') != null) {
                cGmail.lastDomToverify = aProgress.DOMWindow;
                setTimeout("cGmail.onDelayLoad()", 1000);
            }

I loged on to GMail and went to the "create eMail"-page, but in the sourcecode I didn't found any Element with the ID "msg_0" or "msgs"!??

Sorry, but I would need an initial aid...
Is there some kind of operation chart for FireGPG?

Thanks a lot in advance (again)!

Best regards
Stephan

Re: (JavaScript-)API for FireGPG?

It's in a iframe or in ajax, if you look the generated source code (select all text and show the soruce code of the select)...

Thanks for help improve FireGPG !