https://wiki.mozilla.org/api.php?action=feedcontributions&user=MusiqueGraeme&feedformat=atomMozillaWiki - User contributions [en]2024-03-29T02:39:21ZUser contributionsMediaWiki 1.27.4https://wiki.mozilla.org/index.php?title=Talk:Thunderbird/Add-ons_Guide_63&diff=1208296Talk:Thunderbird/Add-ons Guide 632019-02-28T09:53:07Z<p>MusiqueGraeme: /* adding a listener via tabs vs via windows */ Answered the questions</p>
<hr />
<div>(Please place your question in a separate section, with a relevant heading.)<br />
<br />
==== Removing install.rdf? ====<br />
<br />
'''Question''': "To use this overlay loader... extensions must replace <tt>install.rdf</tt> file with a ... <tt>manifest.json</tt>". <- isn't it enough to just ''add'' a <tt>manifest.json</tt> file? Or do I actually need to remove the <tt>install.rdf</tt> to prevent Thunderbird from mishandling my extension?<br />
<br />
'''Answer''': <br />
<br />
==== Name confusion ====<br />
<br />
'''Suggestion''': It seems to me that it would be good to make clear somehow that bootstrapped and restartless are the same things - especially as we talk about overlay legacy addons and bootstrapped legacy addons.<br />
<br />
'''Question''': <tt>AddonManager.getAddonByID(...)</tt> used to be called asynchronously, it seems to not be called anymore?<br />
<br />
'''Answer''': It is returning a promise now.<br />
<br />
==== A sample extension? ====<br />
<br />
This sounds good. I'd like to create a WebExtensions addon... but I read [https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json this page] and it said that a <tt>manifest.json</tt> file is all that's required. I tried that, did a VERY basic manifest.json and zipped it and tried loading it in TB and was told it looked corrupted!<br />
<br />
'''Suggestion''': Could someone create a sample web extension, something like <tt>https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension</tt> ? Thanks! There are a number of helpful extensions here : https://github.com/thundernest/sample-extensions/tree/master/addressBooks<br />
Also if you donwload the extension: Owl for exchange - you need to have a beta version of TB, you'll have a good example of many things.<br />
<br />
==== Need to "create" APIs ====<br />
<br />
'''Question''': Can I write an addon and use the API that are already there... or do I have to create everything?<br />
<br />
'''Answer''': You can use the API at https://thunderbird-webextensions.readthedocs.io/en/latest/. That page also provides a link to a document on Web Extensions Experiment with good explanations of details. Under the Address book API there is an example addon.<br />
<br />
==== stringbundle removal and nsIStringBundleService ====<br />
<br />
'''Question''': Thunderbird 63 - does removing XUL <tt>stringbundleset</tt>/<tt>stringbundle</tt>, also effect <tt>nsIStringBundleService?</tt><br /><br />
Or can this still be used - e.g.:<br /><br />
let sb = Components.classes["@mozilla.org/intl/stringbundle;1"].getService(Components.interfaces.nsIStringBundleService);<br />
<br />
'''Answer''': <tt>nsIStringBundleService</tt> goes away as well. You need to use <br />
Services.strings.createBundle(...)<br />
as suggested on the page.<br />
<br />
==== adding a listener via tabs vs via windows ====<br />
'''Question:''' When I try<br />
browser.tabs.onCreated.addListener(newTab);<br />
that works, and runs newTab. but if I try<br />
browser.windows.onCreated.addListener(newWindow);<br />
this doesn't work, although these events look exactly the same. What is the difference?<br />
<br />
'''Answer''': the windows API is different from the tabs API and so this doesn't work. You can add a listener to a new window with a WebExtensions Experiments addon.</div>MusiqueGraemehttps://wiki.mozilla.org/index.php?title=Talk:Thunderbird/Add-ons_Guide_63&diff=1208295Talk:Thunderbird/Add-ons Guide 632019-02-28T09:50:55Z<p>MusiqueGraeme: /* Need to "create" APIs */ Answered the question</p>
<hr />
<div>(Please place your question in a separate section, with a relevant heading.)<br />
<br />
==== Removing install.rdf? ====<br />
<br />
'''Question''': "To use this overlay loader... extensions must replace <tt>install.rdf</tt> file with a ... <tt>manifest.json</tt>". <- isn't it enough to just ''add'' a <tt>manifest.json</tt> file? Or do I actually need to remove the <tt>install.rdf</tt> to prevent Thunderbird from mishandling my extension?<br />
<br />
'''Answer''': <br />
<br />
==== Name confusion ====<br />
<br />
'''Suggestion''': It seems to me that it would be good to make clear somehow that bootstrapped and restartless are the same things - especially as we talk about overlay legacy addons and bootstrapped legacy addons.<br />
<br />
'''Question''': <tt>AddonManager.getAddonByID(...)</tt> used to be called asynchronously, it seems to not be called anymore?<br />
<br />
'''Answer''': It is returning a promise now.<br />
<br />
==== A sample extension? ====<br />
<br />
This sounds good. I'd like to create a WebExtensions addon... but I read [https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json this page] and it said that a <tt>manifest.json</tt> file is all that's required. I tried that, did a VERY basic manifest.json and zipped it and tried loading it in TB and was told it looked corrupted!<br />
<br />
'''Suggestion''': Could someone create a sample web extension, something like <tt>https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension</tt> ? Thanks! There are a number of helpful extensions here : https://github.com/thundernest/sample-extensions/tree/master/addressBooks<br />
Also if you donwload the extension: Owl for exchange - you need to have a beta version of TB, you'll have a good example of many things.<br />
<br />
==== Need to "create" APIs ====<br />
<br />
'''Question''': Can I write an addon and use the API that are already there... or do I have to create everything?<br />
<br />
'''Answer''': You can use the API at https://thunderbird-webextensions.readthedocs.io/en/latest/. That page also provides a link to a document on Web Extensions Experiment with good explanations of details. Under the Address book API there is an example addon.<br />
<br />
==== stringbundle removal and nsIStringBundleService ====<br />
<br />
'''Question''': Thunderbird 63 - does removing XUL <tt>stringbundleset</tt>/<tt>stringbundle</tt>, also effect <tt>nsIStringBundleService?</tt><br /><br />
Or can this still be used - e.g.:<br /><br />
let sb = Components.classes["@mozilla.org/intl/stringbundle;1"].getService(Components.interfaces.nsIStringBundleService);<br />
<br />
'''Answer''': <tt>nsIStringBundleService</tt> goes away as well. You need to use <br />
Services.strings.createBundle(...)<br />
as suggested on the page.<br />
<br />
==== adding a listener via tabs vs via windows ====<br />
'''Question:''' When I try<br />
browser.tabs.onCreated.addListener(newTab);<br />
that works, and runs newTab. but if I try<br />
browser.windows.onCreated.addListener(newWindow);<br />
this doesn't work, although these events look exactly the same. What is the difference?<br />
<br />
'''Answer''':</div>MusiqueGraemehttps://wiki.mozilla.org/index.php?title=Talk:Thunderbird/Add-ons_Guide_63&diff=1208294Talk:Thunderbird/Add-ons Guide 632019-02-28T09:48:21Z<p>MusiqueGraeme: /* A sample extension? */ corrected to be more up to date</p>
<hr />
<div>(Please place your question in a separate section, with a relevant heading.)<br />
<br />
==== Removing install.rdf? ====<br />
<br />
'''Question''': "To use this overlay loader... extensions must replace <tt>install.rdf</tt> file with a ... <tt>manifest.json</tt>". <- isn't it enough to just ''add'' a <tt>manifest.json</tt> file? Or do I actually need to remove the <tt>install.rdf</tt> to prevent Thunderbird from mishandling my extension?<br />
<br />
'''Answer''': <br />
<br />
==== Name confusion ====<br />
<br />
'''Suggestion''': It seems to me that it would be good to make clear somehow that bootstrapped and restartless are the same things - especially as we talk about overlay legacy addons and bootstrapped legacy addons.<br />
<br />
'''Question''': <tt>AddonManager.getAddonByID(...)</tt> used to be called asynchronously, it seems to not be called anymore?<br />
<br />
'''Answer''': It is returning a promise now.<br />
<br />
==== A sample extension? ====<br />
<br />
This sounds good. I'd like to create a WebExtensions addon... but I read [https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json this page] and it said that a <tt>manifest.json</tt> file is all that's required. I tried that, did a VERY basic manifest.json and zipped it and tried loading it in TB and was told it looked corrupted!<br />
<br />
'''Suggestion''': Could someone create a sample web extension, something like <tt>https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension</tt> ? Thanks! There are a number of helpful extensions here : https://github.com/thundernest/sample-extensions/tree/master/addressBooks<br />
Also if you donwload the extension: Owl for exchange - you need to have a beta version of TB, you'll have a good example of many things.<br />
<br />
==== Need to "create" APIs ====<br />
<br />
'''Question''': Can I write an addon and use the API that are already there... or do I have to create everything?<br />
<br />
'''Answer''': Unclear what you're asking.<br />
<br />
==== stringbundle removal and nsIStringBundleService ====<br />
<br />
'''Question''': Thunderbird 63 - does removing XUL <tt>stringbundleset</tt>/<tt>stringbundle</tt>, also effect <tt>nsIStringBundleService?</tt><br /><br />
Or can this still be used - e.g.:<br /><br />
let sb = Components.classes["@mozilla.org/intl/stringbundle;1"].getService(Components.interfaces.nsIStringBundleService);<br />
<br />
'''Answer''': <tt>nsIStringBundleService</tt> goes away as well. You need to use <br />
Services.strings.createBundle(...)<br />
as suggested on the page.<br />
<br />
==== adding a listener via tabs vs via windows ====<br />
'''Question:''' When I try<br />
browser.tabs.onCreated.addListener(newTab);<br />
that works, and runs newTab. but if I try<br />
browser.windows.onCreated.addListener(newWindow);<br />
this doesn't work, although these events look exactly the same. What is the difference?<br />
<br />
'''Answer''':</div>MusiqueGraemehttps://wiki.mozilla.org/index.php?title=Talk:Thunderbird/Add-ons_Guide_63&diff=1205028Talk:Thunderbird/Add-ons Guide 632018-12-12T16:09:28Z<p>MusiqueGraeme: Question about browser.windows.onCreate</p>
<hr />
<div>(Please place your question in a separate section, with a relevant heading.)<br />
<br />
==== Removing install.rdf? ====<br />
<br />
'''Question''': "To use this overlay loader... extensions must replace <tt>install.rdf</tt> file with a ... <tt>manifest.json</tt>". <- isn't it enough to just ''add'' a <tt>manifest.json</tt> file? Or do I actually need to remove the `install.rdf` to prevent Thunderbird from mishandling my extension?<br />
<br />
==== Name confusion ====<br />
<br />
'''Suggestion''': It seems to me that it would be good to make clear somehow that bootstrapped and restartless are the same things - especially as we talk about overlay legacy addons and bootstrapped legacy addons.<br />
<br />
'''Question''': <tt>AddonManager.getAddonByID(...)</tt> used to be called asynchronously, it seems to not be called anymore?<br />
<br />
==== A sample extension? ====<br />
<br />
This sounds good. I'd like to create a WebExtensions addon... but I read [https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json this page] and it said that a <tt>manifest.json</tt> file is all that's required. I tried that, did a VERY basic manifest.json and zipped it and tried loading it in TB and was told it looked corrupted!<br />
<br />
'''Suggestion''': Could someone create a sample web extension, something like <tt>https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension</tt> ? That would be SO helpful. But I'm sure you're all too busy...<br />
<br />
==== Need to "create" APIs ====<br />
<br />
'''Question''': Can I write an addon and use the API that are already there... or do I have to create everything?<br />
<br />
'''Answer''': Unclear what you're asking<br />
<br />
==== stringbundle removal and nsIStringBundleService ====<br />
<br />
'''Question''': Thunderbird 63 - does removing XUL <tt>stringbundleset</tt>/<tt>stringbundle</tt>, also effect <tt>nsIStringBundleService?</tt><br /><br />
Or can this still be used - e.g.:<br /><br />
<tt>let sb = Components.classes["@mozilla.org/intl/stringbundle;1"].getService(Components.interfaces.nsIStringBundleService);</tt> <br /> <br />
<br />
'''Answer''': <tt>nsIStringBundleService</tt> goes away as well. You need to use <tt>Services.strings.createBundle(..)</tt> as suggested on the page.<br />
<br />
====windows API====<br />
I tried <br />
browser.tabs.onCreated.addListener(newTab);<br />
and it worked, it ran newTab<br />
I tried<br />
browser.windows.onCreated.addListener(newWindow);<br />
and it didn't work although these events look exactly the same. What is the difference?<br />
Blessings G</div>MusiqueGraemehttps://wiki.mozilla.org/index.php?title=Talk:Thunderbird/Add-ons_Guide_63&diff=1202490Talk:Thunderbird/Add-ons Guide 632018-10-16T16:11:16Z<p>MusiqueGraeme: Looking for more detail on how to begin</p>
<hr />
<div>Name confusion<br />
It seems to me that it would be good to make clear somehow that bootstrapped and restartless are the same things - especially as we talk about overlay legacy addons and bootstrapped legacy addons.<br />
<br />
<br />
<br />
Tb63 - AddonManager.getAddonByID(..) used to be called asynchronously, it seems to not be called anymore?<br />
<br />
This sounds good. I'd like to create a WebExtensions addon... but I looked at https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json<br />
<br />
And it said that a manifest.json file is all that's required. I tried that, did a VERY basic manifest.json and zipped it and tried loading it in TB and was told it looked corrupted! <br />
Something like https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension would be SO helpful. But I'm sure you're all too busy...<br />
<br />
Just a point of clarity - can I write an addon and use the API that are already there... or do I have to create everything?</div>MusiqueGraemehttps://wiki.mozilla.org/index.php?title=Talk:Thunderbird/Add-ons_Guide_63&diff=1200459Talk:Thunderbird/Add-ons Guide 632018-09-02T17:02:36Z<p>MusiqueGraeme: Created page with "Name confusion It seems to me that it would be good to make clear somehow that bootstrapped and restartless are the same things - especially as we talk about overlay legacy ad..."</p>
<hr />
<div>Name confusion<br />
It seems to me that it would be good to make clear somehow that bootstrapped and restartless are the same things - especially as we talk about overlay legacy addons and bootstrapped legacy addons.</div>MusiqueGraemehttps://wiki.mozilla.org/index.php?title=Talk:Thunderbird/Add-ons_Guide_57&diff=1189260Talk:Thunderbird/Add-ons Guide 572018-02-21T11:06:52Z<p>MusiqueGraeme: /* Basic Example */ new section</p>
<hr />
<div>Compatible Addons<br />
<br />
What does it mean when it says, at the bottom of the page that all addons compatible with TB 58 beta will be compatible with TB59? My addon works with TB 58 beta and I have not changed the options.xul as per any of the coices given on the page.<br />
<br />
Samples of needed change for Options<br />
<br />
Could you give a date for the production of the samples that you mention?<br />
<br />
== Clarification of the TB 58 to TB 59/60 transition ==<br />
<br />
As it turns out, add-ons compatible with TB 58 need more changes to be compatible with TB 59/60.<br />
<br />
If your options.xul already works, as for some other add-ons I have seen, then no changes are required.<br />
<br />
I haven't had time yet to prepare a sample hybrid add-on with an embedded WebExtension.<br />
<br />
Further question of compatibility<br />
<br />
Could you clarify what type of file is required for an optionsURL. I found both options.xul and options.html mentioned on https://developer.mozilla.org/en-US/docs/Archive/Add-ons/Install_Manifests. However when I tried the options.xul I got the error:<br />
XUL box for setting element contained an inline #text child, forcing all its children to be wrapped in a block.<br />
Also Thunderbird froze and needed closing with TaskManager.:(<br />
<br />
==Further correction:==<br />
The really big change between 58 and 59 was that setCharPref and getCharPref became setStringPref and getStringPref<br />
<br />
With these changes I have a options.xul that works in both 52.4. and 59. I hope that it will work with 60.<br />
<br />
== Basic Example ==<br />
<br />
You removed my basic example saying that it was incorrect!<br />
It was not incorrect - it works.<br />
It may be poorly formatted but you are taking too long to give the basic example that is needed... Reformat it if you like..</div>MusiqueGraemehttps://wiki.mozilla.org/index.php?title=Thunderbird/Add-ons_Guide_57&diff=1189256Thunderbird/Add-ons Guide 572018-02-21T10:41:05Z<p>MusiqueGraeme: /* Basic Example */ corrected titles</p>
<hr />
<div><big>'''Add-ons Guide for Thunderbird 57 and beyond'''</big><br />
<br />
Mozilla core have disabled "legacy" add-ons (add-ons which are not based purely on WebExtensions) in Firefox 57. Because legacy add-ons are not supported from mozilla57 any more, many interfaces have been removed from Mozilla core.<br />
<br />
Despite the interface removals, Thunderbird 57-60 and beyond and Seamonkey will '''<u>still support</u> these as legacy add-ons <u>if</u> the appropriate modifications are done to the add-on to adapt to the changed interfaces'''. <br />
<br />
In addition, Thunderbird will be adding WebExtension support ({{bug|1396172}}) while maintaining "legacy" add-ons and hybrid add-ons.<br />
<br><p><br />
<br />
__TOC__<br />
<br />
== Removed interfaces in mozilla57 ==<br />
* nsILocalFile -- replacement: nsIFile<br />
* extIApplication, nsIEntityConverter<br />
* nsIProgrammingLanguage<br />
* nsILocaleService and friends<br />
* nsIScriptableDateFormat -- replacement: [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat Intl.DateTimeFormat] and mozIntl.DateTimeFormat (use: |Services.intl.createDateTimeFormat(...)| in Thunderbird 57 and 58, changed to |new Services.intl.DateTimeFormat(...)| from Thunderbird 59).<br />
* nsIFilePicker.show() -- replacement: nsIFilePicker.open() (async), example: [https://hg.mozilla.org/comm-central/rev/d960dcde18c4#l6.12 Changeset where Thunderbird implemented that change]. There's also a "lazy" replacement:<br />
<pre>function PickerShow(fp) {<br />
let done = false;<br />
let rv, result;<br />
fp.open(result => {<br />
rv = result;<br />
done = true;<br />
});<br />
let thread = Components.classes["@mozilla.org/thread-manager;1"]<br />
.getService().currentThread;<br />
while (!done) {<br />
thread.processNextEvent(true);<br />
}<br />
return rv;<br />
}<br />
</pre><br />
* nsIDownloadManager<br />
* Promise.jsm -- replacement: PromiseUtils.jsm<br />
* nsIPrefBranch2 and nsIPrefBranchInternal -- replacement: nsIPrefBranch<br />
* nsIExternalProtocolService.loadUrl -- replacement: nsIExternalProtocolService.loadURI<br />
* nsIInputStreamPump.init: Change of arguments<br />
* nsIAtomService - see {{bug|1393692}} for removal from Thunderbird<br />
<br />
== Changes to JS and XUL in mozilla57 == <br />
[https://www.fxsitecompat.com/en-CA/versions/57/] <br />
* `for each ()` construct [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for_each...in] -- replacement: 'for (x of object)' or 'for (x of Object.values())'<br />
* `with` construct [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/with]<br />
* catch (ex if ex instanceof ExceptionType) (removed in mozilla47 already)<br />
* versioned Javascript support -- replacement: In XUL files, links to JS files using <script type="application/x-javascript" ... > or <script type="application/x-javascript;version=1.7" ... >, change to <script type="application/javascript" ... ><br />
* __iterator__ and Iterator()<br />
* "legacy" generators, now need to use `function*` syntax (removed in mozilla? already)<br />
* imports must be 100% correct now: Components.utils.import("resource://gre/modules/...") for Mozilla central imports, Components.utils.import("resource:///modules/...") for Thunderbird imports.<br />
<br />
== Changes in thunderbird57 ==<br />
* steelIApplication (removed due to removal of extIApplication) -- replacement: Services, AppConstants<br />
* for (x in fixIterator(obj)) (removed due to removal of __iterator__) -- replacement: for (x of fixIterator(obj))<br />
<br />
== Removed in mozilla58 ==<br />
* Date.prototype.toLocaleFormat<br />
* {get,set}ComplexValue use of nsISupportsString -- replacement: {get,set}StringPref(), example: [https://hg.mozilla.org/comm-central/rev/3a0c2f6597ef#l1.12 Changeset where Thunderbird implemented that change]<br />
* Mechanism to store add-on preferences in defaults/preferences/xx.js. '''Thunderbird 58 Beta not affected (beta 1+2: backout of this core change, beta 3 has fix from TB 59). A fix has landed on Daily 59 as of 2017-12-12, see {{bug|1414398}}.'''<br />
<br />
== Changes to JS in mozilla58 == <br />
[https://www.fxsitecompat.com/en-CA/versions/58/]<br />
* StopIteration [https://developer.mozilla.org/en-US/docs/Archive/Web/StopIteration]<br />
<br />
== Removed in mozilla59 ==<br />
* Dialog (optionsType=1) and Inline (2) options were removed in {{bug|1414406}}. Thunderbird will not support that feature any more, only options in tabs (3) work now. Replacements:<br />
# If add-on's install.rdf contains no <em:optionsType> declaration, the add-on's preferences page (<em:optionsURL>) will only be accessible via a new submenu in Tools menu (implemented in {{Bug|1419145}}, landed on Daily 59 as of 2017-12-22). The preferences will open in a dialog, as was the case in older versions. [[File:Add-on Options.png|none|Screenshot showing Add-on Options in TB 59]]<br />
# If add-on's install.rdf contains <em:optionsType>3</em:optionsType>, the Preferences button will appear in the Add-on Manager tab besides the add-on, as was the case in older versions. Clicking the button will open the preferences page in a new tab. The preferences page (optionsURL) is also accessible via the new submenu in Tools menu and will open in a tab. No other value of <em:optionsType> is supported and TB will even refuse to install such add-ons (decision from {{bug|1414406}}).<br />
# Alternatively, add-ons may embed a WebExtension to display inline options [https://developer.mozilla.org/Add-ons/WebExtensions/Embedded_WebExtensions][https://developer.mozilla.org/Add-ons/WebExtensions/manifest.json/options_ui]. This should be working now that {{bug|1418914}} has been fixed.<br />
* The statusbarpanel-iconic and statusbarpanel-iconic-text was removed, use toolbarbutton instead. See {{bug|1417198}} for [https://hg.mozilla.org/comm-central/rev/d342491c066b an example].<br />
<br />
== Changes to JS in mozilla59 == <br />
[https://www.fxsitecompat.com/en-CA/versions/59/]<br />
* catch (ex if ...)<br />
* |Services.intl.createDateTimeFormat(...)| in Thunderbird 57 and 58 changed to |new Services.intl.DateTimeFormat(...)|<br />
<br />
== Changes in thunderbird59 ==<br />
* The id of the tab container of the 3pane has changed from "tabcontainer" to "tabmail-tabs". This was done to align the naming with the corresponding Firefox tab container. Add-ons need to replace document.getElementById("tabcontainer") with document.getElementById("tabmail-tabs").<br />
* The bindings for the toolbar customization have moved from "global" to "messenger". If your add-on has customizable icons, please modify your chrome.manifest as shown below:<br />
<pre><br />
style chrome://global/content/customizeToolbar.xul chrome://.../skin/... .css appversion<59.0a1<br />
style chrome://messenger/content/customizeToolbar.xul chrome://.../skin/... .css appversion>=59.0a1<br />
</pre><br />
* CSS for the preference dialogs has moved from Mozilla core to Thunderbird. Add-ons that have an options/preferences dialog that requires this CSS need to add<br />
<pre><br />
<?xml-stylesheet type="text/css" href="chrome://messenger/skin/preferences/preferences.css"?><br />
</pre> to the XUL file that defines that dialog.<br />
<br />
== Outlook and Suggestion ==<br />
'''Suggestion for add-on authors wishing to be compatible with Thunderbird 59: Go, go, go!''' The fix for {{bug|1414398}} (default preferences) and {{Bug|1419145}} (menu to access add-on options, tab options (3) work) has arrived (2017-12-12 and 2017-12-22). {{Bug|1418914}} has been fixed and then inline options can be achieved via an embedded WebExtension. We will prepare a sample of how this is done in early 2018.<br />
<br />
All add-ons compatible with TB 58 beta need further changes as mentioned above to be compatible with TB 59 Beta (expected at the beginning of February 2018) and TB 60 Daily.<br />
<br />
== Also Note ==<br />
The list above only contains selected changes relevant to add-ons. The full list of changes can be seen at [https://developer.mozilla.org/en-US/Firefox/Releases Firefox developer release notes] where all the details, bugzilla bug reports and patches implementing those changes can be found.<br />
<br />
==Basic Example==<br />
You either add OptionType = 3 to the install.rdf and get your options in a separate tab or you add at the top of the options.xul file = <br />
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?><br />
<?xml-stylesheet href="chrome://messenger/skin/prefPanels.css" type="text/css"?><br />
<?xml-stylesheet href="chrome://communicator/skin/pref/pref.css" type="text/css"?><br />
(That gives you a dialog box.)<br />
<br />
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title = "myTitle"<br />
id = "myDialogName"<br />
onload = "onLoad()"<br />
ondialogaccept = "savePrefs();"><br />
<br />
<script type = "application/x-javascript"><br />
<![CDATA[<br />
var prefs = Components.classes["@mozilla.org/preferences-service;1"]<br />
.getService(Components.interfaces.nsIPrefBranch);<br />
<br />
function savePrefs() {<br />
try { <br />
prefs.setStringPref("extensions.myaddon.myvariable",document.getElementById("myID").value);<br />
} catch (ex) {<br />
prefs.setCharPref("extensions.myaddon.myvariable",document.getElementById("myID").value);<br />
}<br />
prefs.setBoolPref("extensions.myaddon.myvariable2") =<br />
document.getElementById("myChkID").checked; <br />
prefs.setCharPref("extensions.myaddon.myvariable3") =<br />
document.getElementById("myCharID").value;<br />
prefs.setIntPref("extensions.myaddon.myvariable4") =<br />
document.getElementById("myIntID").value;<br />
}<br />
<br />
function onLoad() {<br />
try {<br />
document.getElementById("myID").value = prefs.getStringPref("extensions.myaddon.myvariable");<br />
} catch (ex) {<br />
document.getElementById("myID").value = prefs.getCharPref("extensions.myaddon.myvariable");<br />
}<br />
document.getElementById("myChkID").checked = prefs.getBoolPref("extensions.myaddon.myvariable2");<br />
document.getElementById("myCharID").value = prefs.getCharPref("extensions.myaddon.myvariable3");<br />
document.getElementById("myIntID").value = prefs.getIntPref("extensions.myaddon.myvariable4");<br />
}<br />
<br />
]]><br />
</script><br />
<br />
(That gives you the details actions of the dialog box)<br />
<groupbox><br />
<caption label = "myLabel" /><br />
<hbox align = "centre"><br />
<textbox id = "myID" size = "28" /><br />
</hbox><br />
<label value = "myText " /><br />
<hbox align="center"><br />
<checkbox id="myChkID" label="myLabel"/><br />
</hbox><br />
</groupbox><br />
</dialog><br />
(Char and Int Variables can be shown in a textbox.)</div>MusiqueGraemehttps://wiki.mozilla.org/index.php?title=Thunderbird/Add-ons_Guide_57&diff=1189255Thunderbird/Add-ons Guide 572018-02-21T10:39:36Z<p>MusiqueGraeme: Added a very simple options.xul file and a few extra options.</p>
<hr />
<div><big>'''Add-ons Guide for Thunderbird 57 and beyond'''</big><br />
<br />
Mozilla core have disabled "legacy" add-ons (add-ons which are not based purely on WebExtensions) in Firefox 57. Because legacy add-ons are not supported from mozilla57 any more, many interfaces have been removed from Mozilla core.<br />
<br />
Despite the interface removals, Thunderbird 57-60 and beyond and Seamonkey will '''<u>still support</u> these as legacy add-ons <u>if</u> the appropriate modifications are done to the add-on to adapt to the changed interfaces'''. <br />
<br />
In addition, Thunderbird will be adding WebExtension support ({{bug|1396172}}) while maintaining "legacy" add-ons and hybrid add-ons.<br />
<br><p><br />
<br />
__TOC__<br />
<br />
== Removed interfaces in mozilla57 ==<br />
* nsILocalFile -- replacement: nsIFile<br />
* extIApplication, nsIEntityConverter<br />
* nsIProgrammingLanguage<br />
* nsILocaleService and friends<br />
* nsIScriptableDateFormat -- replacement: [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat Intl.DateTimeFormat] and mozIntl.DateTimeFormat (use: |Services.intl.createDateTimeFormat(...)| in Thunderbird 57 and 58, changed to |new Services.intl.DateTimeFormat(...)| from Thunderbird 59).<br />
* nsIFilePicker.show() -- replacement: nsIFilePicker.open() (async), example: [https://hg.mozilla.org/comm-central/rev/d960dcde18c4#l6.12 Changeset where Thunderbird implemented that change]. There's also a "lazy" replacement:<br />
<pre>function PickerShow(fp) {<br />
let done = false;<br />
let rv, result;<br />
fp.open(result => {<br />
rv = result;<br />
done = true;<br />
});<br />
let thread = Components.classes["@mozilla.org/thread-manager;1"]<br />
.getService().currentThread;<br />
while (!done) {<br />
thread.processNextEvent(true);<br />
}<br />
return rv;<br />
}<br />
</pre><br />
* nsIDownloadManager<br />
* Promise.jsm -- replacement: PromiseUtils.jsm<br />
* nsIPrefBranch2 and nsIPrefBranchInternal -- replacement: nsIPrefBranch<br />
* nsIExternalProtocolService.loadUrl -- replacement: nsIExternalProtocolService.loadURI<br />
* nsIInputStreamPump.init: Change of arguments<br />
* nsIAtomService - see {{bug|1393692}} for removal from Thunderbird<br />
<br />
== Changes to JS and XUL in mozilla57 == <br />
[https://www.fxsitecompat.com/en-CA/versions/57/] <br />
* `for each ()` construct [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for_each...in] -- replacement: 'for (x of object)' or 'for (x of Object.values())'<br />
* `with` construct [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/with]<br />
* catch (ex if ex instanceof ExceptionType) (removed in mozilla47 already)<br />
* versioned Javascript support -- replacement: In XUL files, links to JS files using <script type="application/x-javascript" ... > or <script type="application/x-javascript;version=1.7" ... >, change to <script type="application/javascript" ... ><br />
* __iterator__ and Iterator()<br />
* "legacy" generators, now need to use `function*` syntax (removed in mozilla? already)<br />
* imports must be 100% correct now: Components.utils.import("resource://gre/modules/...") for Mozilla central imports, Components.utils.import("resource:///modules/...") for Thunderbird imports.<br />
<br />
== Changes in thunderbird57 ==<br />
* steelIApplication (removed due to removal of extIApplication) -- replacement: Services, AppConstants<br />
* for (x in fixIterator(obj)) (removed due to removal of __iterator__) -- replacement: for (x of fixIterator(obj))<br />
<br />
== Removed in mozilla58 ==<br />
* Date.prototype.toLocaleFormat<br />
* {get,set}ComplexValue use of nsISupportsString -- replacement: {get,set}StringPref(), example: [https://hg.mozilla.org/comm-central/rev/3a0c2f6597ef#l1.12 Changeset where Thunderbird implemented that change]<br />
* Mechanism to store add-on preferences in defaults/preferences/xx.js. '''Thunderbird 58 Beta not affected (beta 1+2: backout of this core change, beta 3 has fix from TB 59). A fix has landed on Daily 59 as of 2017-12-12, see {{bug|1414398}}.'''<br />
<br />
== Changes to JS in mozilla58 == <br />
[https://www.fxsitecompat.com/en-CA/versions/58/]<br />
* StopIteration [https://developer.mozilla.org/en-US/docs/Archive/Web/StopIteration]<br />
<br />
== Removed in mozilla59 ==<br />
* Dialog (optionsType=1) and Inline (2) options were removed in {{bug|1414406}}. Thunderbird will not support that feature any more, only options in tabs (3) work now. Replacements:<br />
# If add-on's install.rdf contains no <em:optionsType> declaration, the add-on's preferences page (<em:optionsURL>) will only be accessible via a new submenu in Tools menu (implemented in {{Bug|1419145}}, landed on Daily 59 as of 2017-12-22). The preferences will open in a dialog, as was the case in older versions. [[File:Add-on Options.png|none|Screenshot showing Add-on Options in TB 59]]<br />
# If add-on's install.rdf contains <em:optionsType>3</em:optionsType>, the Preferences button will appear in the Add-on Manager tab besides the add-on, as was the case in older versions. Clicking the button will open the preferences page in a new tab. The preferences page (optionsURL) is also accessible via the new submenu in Tools menu and will open in a tab. No other value of <em:optionsType> is supported and TB will even refuse to install such add-ons (decision from {{bug|1414406}}).<br />
# Alternatively, add-ons may embed a WebExtension to display inline options [https://developer.mozilla.org/Add-ons/WebExtensions/Embedded_WebExtensions][https://developer.mozilla.org/Add-ons/WebExtensions/manifest.json/options_ui]. This should be working now that {{bug|1418914}} has been fixed.<br />
* The statusbarpanel-iconic and statusbarpanel-iconic-text was removed, use toolbarbutton instead. See {{bug|1417198}} for [https://hg.mozilla.org/comm-central/rev/d342491c066b an example].<br />
<br />
== Changes to JS in mozilla59 == <br />
[https://www.fxsitecompat.com/en-CA/versions/59/]<br />
* catch (ex if ...)<br />
* |Services.intl.createDateTimeFormat(...)| in Thunderbird 57 and 58 changed to |new Services.intl.DateTimeFormat(...)|<br />
<br />
== Changes in thunderbird59 ==<br />
* The id of the tab container of the 3pane has changed from "tabcontainer" to "tabmail-tabs". This was done to align the naming with the corresponding Firefox tab container. Add-ons need to replace document.getElementById("tabcontainer") with document.getElementById("tabmail-tabs").<br />
* The bindings for the toolbar customization have moved from "global" to "messenger". If your add-on has customizable icons, please modify your chrome.manifest as shown below:<br />
<pre><br />
style chrome://global/content/customizeToolbar.xul chrome://.../skin/... .css appversion<59.0a1<br />
style chrome://messenger/content/customizeToolbar.xul chrome://.../skin/... .css appversion>=59.0a1<br />
</pre><br />
* CSS for the preference dialogs has moved from Mozilla core to Thunderbird. Add-ons that have an options/preferences dialog that requires this CSS need to add<br />
<pre><br />
<?xml-stylesheet type="text/css" href="chrome://messenger/skin/preferences/preferences.css"?><br />
</pre> to the XUL file that defines that dialog.<br />
<br />
== Outlook and Suggestion ==<br />
'''Suggestion for add-on authors wishing to be compatible with Thunderbird 59: Go, go, go!''' The fix for {{bug|1414398}} (default preferences) and {{Bug|1419145}} (menu to access add-on options, tab options (3) work) has arrived (2017-12-12 and 2017-12-22). {{Bug|1418914}} has been fixed and then inline options can be achieved via an embedded WebExtension. We will prepare a sample of how this is done in early 2018.<br />
<br />
All add-ons compatible with TB 58 beta need further changes as mentioned above to be compatible with TB 59 Beta (expected at the beginning of February 2018) and TB 60 Daily.<br />
<br />
== Also Note ==<br />
The list above only contains selected changes relevant to add-ons. The full list of changes can be seen at [https://developer.mozilla.org/en-US/Firefox/Releases Firefox developer release notes] where all the details, bugzilla bug reports and patches implementing those changes can be found.<br />
<br />
==Basic Example==<br />
You either add OptionType = 3 to the install.rdf and get your options in a separate tab or you add at the top of the options.xul file = <br />
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?><br />
<?xml-stylesheet href="chrome://messenger/skin/prefPanels.css" type="text/css"?><br />
<?xml-stylesheet href="chrome://communicator/skin/pref/pref.css" type="text/css"?><br />
(That gives you a dialog box.)<br />
<br />
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title = "Single Domain Preference"<br />
id = "myDialogName"<br />
onload = "onLoad()"<br />
ondialogaccept = "savePrefs();"><br />
<br />
<script type = "application/x-javascript"><br />
<![CDATA[<br />
var prefs = Components.classes["@mozilla.org/preferences-service;1"]<br />
.getService(Components.interfaces.nsIPrefBranch);<br />
<br />
function savePrefs() {<br />
try { <br />
prefs.setStringPref("extensions.myaddon.myvariable",document.getElementById("myID").value);<br />
} catch (ex) {<br />
prefs.setCharPref("extensions.myaddon.myvariable",document.getElementById("myID").value);<br />
}<br />
prefs.setBoolPref("extensions.myaddon.myvariable2") =<br />
document.getElementById("myChkID").checked; <br />
prefs.setCharPref("extensions.myaddon.myvariable3") =<br />
document.getElementById("myCharID").value;<br />
prefs.setIntPref("extensions.myaddon.myvariable4") =<br />
document.getElementById("myIntID").value;<br />
}<br />
<br />
function onLoad() {<br />
try {<br />
document.getElementById("myID").value = prefs.getStringPref("extensions.myaddon.myvariable");<br />
} catch (ex) {<br />
document.getElementById("myID").value = prefs.getCharPref("extensions.myaddon.myvariable");<br />
}<br />
document.getElementById("myChkID").checked = prefs.getBoolPref("extensions.myaddon.myvariable2");<br />
document.getElementById("myCharID").value = prefs.getCharPref("extensions.myaddon.myvariable3");<br />
document.getElementById("myIntID").value = prefs.getIntPref("extensions.myaddon.myvariable4");<br />
}<br />
<br />
]]><br />
</script><br />
<br />
(That gives you the details actions of the dialog box)<br />
<groupbox><br />
<caption label = "myLabel" /><br />
<hbox align = "centre"><br />
<textbox id = "myID" size = "28" /><br />
</hbox><br />
<label value = "myText " /><br />
<hbox align="center"><br />
<checkbox id="myChkID" label="myLabel"/><br />
</hbox><br />
</groupbox><br />
</dialog><br />
(Char and Int Variables can be shown in a textbox.)</div>MusiqueGraemehttps://wiki.mozilla.org/index.php?title=Talk:Thunderbird/Add-ons_Guide_57&diff=1189183Talk:Thunderbird/Add-ons Guide 572018-02-20T11:27:17Z<p>MusiqueGraeme: Added note about CharPref => StringPref</p>
<hr />
<div>Compatible Addons<br />
<br />
What does it mean when it says, at the bottom of the page that all addons compatible with TB 58 beta will be compatible with TB59? My addon works with TB 58 beta and I have not changed the options.xul as per any of the coices given on the page.<br />
<br />
Samples of needed change for Options<br />
<br />
Could you give a date for the production of the samples that you mention?<br />
<br />
== Clarification of the TB 58 to TB 59/60 transition ==<br />
<br />
As it turns out, add-ons compatible with TB 58 need more changes to be compatible with TB 59/60.<br />
<br />
If your options.xul already works, as for some other add-ons I have seen, then no changes are required.<br />
<br />
I haven't had time yet to prepare a sample hybrid add-on with an embedded WebExtension.<br />
<br />
Further question of compatibility<br />
<br />
Could you clarify what type of file is required for an optionsURL. I found both options.xul and options.html mentioned on https://developer.mozilla.org/en-US/docs/Archive/Add-ons/Install_Manifests. However when I tried the options.xul I got the error:<br />
XUL box for setting element contained an inline #text child, forcing all its children to be wrapped in a block.<br />
Also Thunderbird froze and needed closing with TaskManager.:(<br />
<br />
==Further correction:==<br />
The really big change between 58 and 59 was that setCharPref and getCharPref became setStringPref and getStringPref<br />
<br />
With these changes I have a options.xul that works in both 52.4. and 59. I hope that it will work with 60.</div>MusiqueGraemehttps://wiki.mozilla.org/index.php?title=Talk:Thunderbird/Add-ons_Guide_57&diff=1188412Talk:Thunderbird/Add-ons Guide 572018-02-02T12:22:57Z<p>MusiqueGraeme: Added question of the file type for OptionsURL</p>
<hr />
<div>Compatible Addons<br />
<br />
What does it mean when it says, at the bottom of the page that all addons compatible with TB 58 beta will be compatible with TB59? My addon works with TB 58 beta and I have not changed the options.xul as per any of the coices given on the page.<br />
<br />
Samples of needed change for Options<br />
<br />
Could you give a date for the production of the samples that you mention?<br />
<br />
== Clarification of the TB 58 to TB 59/60 transition ==<br />
<br />
As it turns out, add-ons compatible with TB 58 need more changes to be compatible with TB 59/60.<br />
<br />
If your options.xul already works, as for some other add-ons I have seen, then no changes are required.<br />
<br />
I haven't had time yet to prepare a sample hybrid add-on with an embedded WebExtension.<br />
<br />
Further question of compatibility<br />
<br />
Could you clarify what type of file is required for an optionsURL. I found both options.xul and options.html mentioned on https://developer.mozilla.org/en-US/docs/Archive/Add-ons/Install_Manifests. However when I tried the options.xul I got the error:<br />
XUL box for setting element contained an inline #text child, forcing all its children to be wrapped in a block.<br />
Also Thunderbird froze and needed closing with TaskManager.:(</div>MusiqueGraemehttps://wiki.mozilla.org/index.php?title=Talk:Thunderbird/Add-ons_Guide_57&diff=1188408Talk:Thunderbird/Add-ons Guide 572018-02-02T11:56:17Z<p>MusiqueGraeme: Need more infomation about changes to the options option...</p>
<hr />
<div>Compatible Addons<br />
<br />
What does it mean when it says, at the bottom of the page that all addons compatible with TB 58 beta will be compatible with TB59? My addon works with TB 58 beta and I have not changed the options.xul as per any of the coices given on the page.<br />
<br />
Samples of needed change for Options<br />
<br />
Could you give a date for the production of the samples that you mention?</div>MusiqueGraemehttps://wiki.mozilla.org/index.php?title=Talk:Thunderbird/Add-ons_Guide_57&diff=1188407Talk:Thunderbird/Add-ons Guide 572018-02-02T11:55:16Z<p>MusiqueGraeme: Created page with "Compatible Addons What does it mean when it says, at the bottom of the page that all addons compatible with TB 58 beta will be compatible with TB59? My addon works with TB 58..."</p>
<hr />
<div>Compatible Addons<br />
What does it mean when it says, at the bottom of the page that all addons compatible with TB 58 beta will be compatible with TB59? My addon works with TB 58 beta and I have not changed the options.xul as per any of the coices given on the page.<br />
<br />
Samples of needed change for Options<br />
Could you give a date for the production of the samples that you mention?</div>MusiqueGraemehttps://wiki.mozilla.org/index.php?title=Talk:Releases&diff=1188406Talk:Releases2018-02-02T11:46:41Z<p>MusiqueGraeme: /* Thunderbird release page */ new section</p>
<hr />
<div>== Please do not edit schedule dates unless you are a project driver ==<br />
<br />
These dates are supposed to reflect the schedule decided, rather than being predictions of when releases might happen. Each time these dates are changed, discussions are sparked off in various forums about the new schedule. They should be left to reflect the "official" schedule, even if that is clearly out of date. When the information is out of date, people can see that it is out of date, which is better than people believing that a new schedule has been decided when it hasn't. --[[User:Michaell|Michaell]] 03:57, 1 October 2010 (PDT)<br />
<br />
== ordinal numerals in release dates ==<br />
<br />
http://en.wikipedia.org/wiki/Calendar_date#Expressing_dates_in_spoken_English<br />
says ordinal numerals (aka december 1st vs. decemer 1) etc are also proper english form to express dates in the english language. when i grew up and learned the english language, we have learned to write the numerals. i wonder why people keep forgetting them, or why some dudes make an explicit edit of this releases page just to get rid of my ordinal. wikipedia edit wars anyone?<br />
<br />
=== The answer to this question ===<br />
<br />
This page browsing people from different countries, who may not understand the meaning of a particular end of the word. This is table, and please, do not be offended (If I offended you) --[[User:Tro|Tro]] 12:13, 2 December 2009 (UTC)<br />
<br />
=== Use ISO dates instead? ===<br />
<br />
The other option would be of course to use YYYY-MM-DD dates instead, which are standardized by ISO and also used by bugzilla as locale-independent representation. Anyway, not a big deal, except that the archived release listing are inconsistent in providing also the year in the date. --[[User:Rsx11m|Rsx11m]] 14:42, 2 December 2009 (UTC) - ''BTW: MediaWiki is using "day month year" for its time stamps ...''<br />
<br />
== Gecko versions == <br />
Please indicate the Gecko version for each release so that viewers can correlate releases of Firefox, Thunderbird, SeaMonkey, etc.<br />
<br />
== Page updates ==<br />
<br />
Who is responsible to update this page? Because the recent released Firefox versions still marked as being scheduled for release in April, and this is not the first time this happening. If this page is obsolete, can you please link it to a better source? Thanks. Tomer 02:00, 26 March 2011 (PDT)<br />
: This page is a mess at the moment, Firefox releases are no longer listed, and the banners are mostly listing "some day in the past" &mdash; can anybody fix the macros to be less sensitive to editing or getting outdated? --[[User:Rsx11m|Rsx11m]] ([[User talk:Rsx11m|talk]]) 20:12, 19 June 2015 (PDT)<br />
<br />
== bigger height graphics needed ==<br />
<br />
bigger height graphics needed so the text doesn't overlap<br />
--[[User:J4n|Jan &#91;:Jan\&#93;]] ([[User talk:J4n|talk]]) 07:48, 25 August 2014 (PDT)<br />
<br />
== WebCompat issue on the release page ==<br />
<br />
I'm not sure it's really a WebCompat issue. <br />
But someone reported that images were a bit packed on mobile viewport.<br />
See https://webcompat.com/issues/1982<br />
--[[User:Karlcow|Karlcow]] ([[User talk:Karlcow|talk]]) 20:57, 29 November 2015 (PST)<br />
<br />
== Thunderbird release page ==<br />
<br />
Can someone please add a link to the release dates for Thunderbird and Seamonkey?</div>MusiqueGraeme