2

The documentation for menus API of Thunderbird 68 says :

The following properties are only set if the extension has host permissions for the given context: linkUrl, linkText, srcUrl, pageUrl, frameUrl, selectionText.

In my manifest.json, following are the list of permissions i had requested from host:

"permissions": [
    "menus",
    "activeTab",
    "tabs",
    "<all_urls>"
],
"content_scripts": [
   {
      "matches": ["<all_urls>"]
   }
]

But, when a text is selected in content of email, the selected text is not being included in the info object.

{"menuItemId":"open_link","parentMenuItemId":"context_customlinks","editable":false,"modifiers":[],"button":0}

Earlier the selection of text worked fine in my XUL based extension. But, after porting it to WebExtension the selection text is not being passed leading to missing functionality in my extension.

I tried searching relevant information in all the places (Thunderbird Documentation, Webextension Documentation, GitHub, Stackoverflow, Google, etc.,) to get the idea of host permissions required for info.SelectionText, but the information couldn't be found anywhere.

Requesting help in resolving this issue.

Josh Lee
  • 171,072
  • 38
  • 269
  • 275
bprasanna
  • 2,423
  • 3
  • 27
  • 39
  • After filing a [bug](https://bugzilla.mozilla.org/show_bug.cgi?id=1579059) for this issue, it has been uncovered that there was already an existing [bug](https://bugzilla.mozilla.org/show_bug.cgi?id=1504475) to bring support for content scripts in email display browsers. So, only when the fix for bug has landed, the possibility of reading content in email browser becomes possible. – bprasanna Sep 10 '19 at 13:20
  • The initial [bug](https://bugzilla.mozilla.org/show_bug.cgi?id=1579059) itself has been fixed now. The fix for this will land in Thunderbird version 72+ and Thunderbird ESR 68.3.1. Really appreciate the help of developers/contributors of Thunderbird. – bprasanna Dec 21 '19 at 02:37

0 Answers0