protz/LatexIt

Incompatible with Thunderbird 60+ and WebExtensions

Closed this issue · 5 comments

Thunderbird phased out support of legacy XPI extensions in favor of WebExtensions. LaTeX It! is sadly affected too. Is there any chance to port this extension?

According to this page Thunderbird 60 still supports legacy extensions and furthermore "Thunderbird 60 does not have WebExtensions support." Support for WebExtensions will be added in version 63.

But "all add-on authors must check to see whether code changes are needed." And the Thunderbird 60 release notes say say "Add-ons not marked as compatible with Thunderbird 60 by their authors will be disabled (this can be reverted via preference extensions.strictCompatibility)"

So it seems to me that

  • We can work around this but setting extensions.strictCompatibility to false.
  • The problem can be solved (for TB 60) if the author marks LaTeXiT as compatible with Thunderbird 60.
  • It would be a good idea to develop a WebExtensions version if that is possible.

I tried setting extensions.strictCompatibility to false. This allowed LaTeX It to install. But when I click the LaTeX It button, an exception

 "Component returned failure code: 0x80570018 (NS_ERROR_XPC_BAD_IID) [nsIJSCID.createInstance]"

is thrown the first time the first line of init_file

  var f = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);

is executed. And that seems to be because

  Components.interfaces.nsILocalFile

is undefined.

So maybe it really isn't compatible after all.

I made the changes found in the add-ons guide in my fork of LaTeX It!. It's been working great for me for a couple months now using TB60.

sphh commented

@indigestion, that is really great news! Can you please make a pull request – I am sure that Jonathan (@protz) will gladly accept it and release a new version for all of us. Thanks.

Done, see #26.