Thunderbird Plugin: Change email messages being displayed

23 Views Asked by At

I'm working on my plugin that needs to add a section at the bottom of email messages being displayed.

I'm using the messageDisplayScripts API provided by Thunderbird, and I've added the messagesModify permission in my manifest.json:

"permissions": [
    "menus",
    "messagesRead",
    "messagesModify",
    "storage"
],

The following code is in my background.js:

messenger.messageDisplayScripts.register({
    js: [
        { file: 'test.js' }
    ]
})

With a simple code inside test.js:

console.info("Test.js called")

But nothing happens; my code inside test.js is never called, and I have no idea why this is happening.

Do you have any suggestions or alternative ways to add a section at the bottom of an email message being displayed?

In console, I don't have any errors. I tried to modify the path of the file test.js to /test.js (it's in the root of the plugin) but nothing happens. Paradoxically, even when I put a JavaScript file path that doesn't exist, I don't get any errors.

0

There are 0 best solutions below