Frage

I have followed the tutorial for getting a Thunderbird extention going and succeeded in getting extensions that use the "load" event to work (the basic "date" example and random text using alert("hey"); both work).

However, I can't seem to get any message-based events to trigger. I've tried using various types of alerts and it just seems my code is not being ran. For example:

function send_event_handler( evt ) {
  alert("hohoho");
}

window.addEventListener( "compose-send-message", send_event_handler, true );

How do I get events to trigger that allow me to modify message bodies?

My test platform is using Thunderbird 13.

My manifest is:

content     thundersafe    chrome/content/
overlay chrome://messenger/content/messenger.xul chrome://thundersafe/content/thundersafe.xul
War es hilfreich?

Lösung

Thanks to WladimirPalant, I looked for other overlays. This didn't occur to me because I thought the overlay would only be useful for adjusting the GUI via XUL join points - clearly I have a lot to learn.

The correct overlay for my use is:

chrome://messenger/content/messengercompose/messengercompose.xul

This overlay was discovered by looking at other extensions. I couldn't find a list of overlays and their intended uses anywhere on MDN.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top