Skip to content

Commit

Permalink
Support Modern SeaMonkey
Browse files Browse the repository at this point in the history
  • Loading branch information
RealityRipple committed Feb 27, 2021
1 parent 124dddc commit df0c950
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Export your extensions!
#### Supports
* Pale Moon [25.0a1pre - 29.*]
* Firefox [3.0 - 50.*]
* SeaMonkey [2.0a1 - 2.40]
* SeaMonkey [2.0a1 - 2.*]
* Thunderbird [2.0 - 52.*]
* Sunbird [1.0b1 - 5.0b2pre]

Expand Down
6 changes: 6 additions & 0 deletions chrome/content/binding.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,12 @@
}
}
}
else if (this.parentNode.parentNode.parentNode.parentNode.tagName.toLowerCase() === 'richlistitem')
{
extName = this.parentNode.parentNode.parentNode.parentNode.getAttribute('name');
extID = this.parentNode.parentNode.parentNode.parentNode.value;
extVer = this.parentNode.parentNode.parentNode.parentNode.mAddon.version;
}
else
{
extName = this.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.getAttribute('name');
Expand Down
22 changes: 19 additions & 3 deletions chrome/content/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,14 @@ var ExtExp =
{
var existings;
var cb;
if (document.getElementById('view-port').selectedPanel.id == 'list-view')
var viewBox = null;
if (document.getElementById('headered-views-content') !== null)
viewBox = document.getElementById('headered-views-content');
else if (document.getElementById('view-port') !== null)
viewBox = document.getElementById('view-port');
if (viewBox === null)
return;
if (viewBox.selectedPanel.id == 'list-view')
{
for (var i=0; i < document.getElementById('addon-list').itemCount; i++)
{
Expand Down Expand Up @@ -77,7 +84,7 @@ var ExtExp =
}
document.getElementById('addon-list').addEventListener('select', ExtExp.newButton, false);
}
else if (document.getElementById('view-port').selectedPanel.id == 'detail-view')
else if (viewBox.selectedPanel.id == 'detail-view')
{
var detail = document.getElementById('detail-view');
existings = detail.getElementsByTagName('extExpExportButton');
Expand Down Expand Up @@ -110,7 +117,14 @@ var ExtExp =
},
newButton: function()
{
if (document.getElementById('view-port').selectedPanel.id == 'list-view')
var viewBox = null;
if (document.getElementById('headered-views-content') !== null)
viewBox = document.getElementById('headered-views-content');
else if (document.getElementById('view-port') !== null)
viewBox = document.getElementById('view-port');
if (viewBox === null)
return;
if (viewBox.selectedPanel.id == 'list-view')
{
for (var i = 0; i < document.getElementById('addon-list').itemCount; i++)
{
Expand Down Expand Up @@ -326,6 +340,8 @@ var ExtExp =
var extVer = '0.0';
if (typeof child._version !== 'undefined' && child._version !== null && child._version.hasAttribute('value'))
extVer = child._version.getAttribute('value');
if (typeof child.mAddon !== undefined && child.mAddon.version !== null)
extVer = child.mAddon.version;
var ext = {name: extName, version: extVer, id: extID, path: extPath};
expList.push(ext);
}
Expand Down
2 changes: 1 addition & 1 deletion install.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<Description>
<em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
<em:minVersion>2.0a1</em:minVersion>
<em:maxVersion>2.40</em:maxVersion>
<em:maxVersion>2.*</em:maxVersion>
</Description>
</em:targetApplication>
<!-- Thunderbird -->
Expand Down

0 comments on commit df0c950

Please sign in to comment.