The pre-existing code implemented the "seamonkey hack", which would set the
id for the menu_NewPopup menuitem to newNewMsgCmd if an id didn't
already exist. It would then use that id (newNewMsgCmd) in subsequent
searches. The trouble is, if the id had already been set, the
subsequent searches would fail unless the existing value was
newNewMsgCmd. In fact, in recent versions of Thunderbird, the
pre-existing id is actually menu_newNewMsgCmd, so the searches fail.
The bug in the existing code gives rise to the following startup errors:
Error: Failed to clone newNewMsgCmd
Source File: resource://mintrayr/mintrayr.jsm
Line: 124
Error: TypeError: document.getElementById(...) is null
Source File: chrome://mintrayr/content/messenger/messenger.js
Line: 75
And, subsequently, the follow error when invoked:
Error: TypeError: gMinTrayR.minimize is not a function
Source File: chrome://messenger/content/messenger.xul
Line: 1
The fix is simply to remember the id, whether it was already set or set in
the local code, and then to use the remembered value in searches.
At the command line, from within the directory, type python build.py
to create the .xpi file.
In Thunderbird, in the "Extensions" tab of the "Add-ons Manager" page
(accessible from the "Tools"->"Add-ons" menu), remove the existing
extension and restart Thunderbird.
In Thunderbird, again on the "Add-ons Manager" page, select the
"Tools for All Add-ons" drop-down near upper-right and choose "Install
Add-on From File...".
Select the .xpi that was created in step 2, confirm with "Install
Now", and restart Thunderbird.
Fixes operation of MinTrayR on Thunderbird 38.2.0
The pre-existing code implemented the "seamonkey hack", which would set the id for the
menu_NewPopup menuitem
tonewNewMsgCmd
if an id didn't already exist. It would then use that id (newNewMsgCmd
) in subsequent searches. The trouble is, if the id had already been set, the subsequent searches would fail unless the existing value wasnewNewMsgCmd
. In fact, in recent versions of Thunderbird, the pre-existing id is actuallymenu_newNewMsgCmd
, so the searches fail.The bug in the existing code gives rise to the following startup errors:
The fix is simply to remember the id, whether it was already set or set in the local code, and then to use the remembered value in searches.
This commit fixes the following issues:
As a consequence, it may also resolve some of the complaints of dysfunction in recent reviews (as of Sunday, September 13, 2015): https://addons.mozilla.org/en-US/thunderbird/addon/minimizetotray-revived/reviews/
To test the fix locally,
python build.py
to create the .xpi file.