Skip to content

Commit aac098f

Browse files
committed
Updated to work with TB 68+.
1 parent ba1e04a commit aac098f

8 files changed

+59
-41
lines changed

_locales/cs/messages.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extensionName": {
3+
"message": "Filtr zpráv pro mailing listy",
4+
"description": "Name of the extension."
5+
},
6+
7+
"extensionDescription": {
8+
"message": "Filtrování zpráv podle přítomnosti kontaktu v mailing listu.",
9+
"description": "Description of the extension."
10+
}
11+
12+
}

_locales/en/messages.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extensionName": {
3+
"message": "Mailing-list filter",
4+
"description": "Name of the extension."
5+
},
6+
7+
"extensionDescription": {
8+
"message": "Mail filter search term using mailing lists",
9+
"description": "Description of the extension."
10+
}
11+
12+
}

chrome.manifest

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
content mailing-list-filter content/
22
resource mailing-list-filter content/
3-
locale mailing-list-filter en-US locale/en-US/
4-
locale mailing-list-filter cs locale/cs/
3+
locale mailing-list-filter en-US _locales/en/
4+
locale mailing-list-filter cs _locales/cs/
55
skin mailing-list-filter classic/1.0 skin/
66
overlay chrome://messenger/content/messenger.xul chrome://mailing-list-filter/content/messengerOverlay.xul
77
overlay chrome://messenger/content/FilterEditor.xul chrome://mailing-list-filter/content/filterEditorOverlay.xul
8+
overlay chrome://messenger/content/SearchDialog.xul chrome://mailing-list-filter/content/filterEditorOverlay.xul

content/bindings.xml

+9-12
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141
<stylesheet src="chrome://mailing-list-filter/skin/mailing-list-filter.css"/>
4242
</resources>
4343
<content>
44-
<xul:menulist flex="1" class="search-value-menulist" xbl:inherits="disabled"
44+
<menulist flex="1" class="search-value-menulist" xbl:inherits="disabled" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
4545
oncommand="this.parentNode.setAttribute('value', this.value);this.parentNode.value=this.value">
46-
<xul:menupopup class="search-value-popup" />
47-
</xul:menulist>
46+
<menupopup class="search-value-popup" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" />
47+
</menulist>
4848
</content>
4949
<implementation>
5050
<method name="addDirectories">
@@ -57,7 +57,7 @@
5757
if (dir instanceof Components.interfaces.nsIAbDirectory)
5858
{
5959
// get children
60-
let newMenuItem = document.createElement('menuitem');
60+
let newMenuItem = document.createXULElement('menuitem');
6161
let displayLabel = dir.dirName;
6262
if (dir.isMailList)
6363
displayLabel = "--" + displayLabel;
@@ -77,7 +77,7 @@
7777
<![CDATA[
7878
let menulist = document.getAnonymousNodes(this)[0];
7979
let value = this.getAttribute("value");
80-
let menupopup = menulist.menupopup;
80+
let menupopup = menulist.getElementsByTagName('menupopup')[0];
8181
8282
// set the default to the personal address book
8383
if (!value || !value.length)
@@ -88,14 +88,11 @@
8888
.getService(Components.interfaces.nsIAbManager);
8989
this.addDirectories(abManager.directories, menupopup);
9090
91-
// scan all menupopup items to find the uri for the selection
92-
let valueElements = menupopup.getElementsByAttribute('value', value);
93-
if (valueElements && valueElements.length)
94-
menulist.selectedItem = valueElements[0];
95-
else
96-
menulist.selectedIndex = 0;
91+
menulist.setAttribute('value', value);
92+
93+
this.setAttribute("value", value);
94+
this.value = value;
9795
98-
this.value = menulist.selectedItem.getAttribute("value");
9996
]]>
10097
</constructor>
10198
</implementation>

install.rdf

-27
This file was deleted.

manifest.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"manifest_version": 2,
3+
"applications": {
4+
"gecko": {
5+
"id": "{47ef7cc0-2201-11da-8cd6-0800200c9a66}",
6+
"strict_min_version": "68.0"
7+
}
8+
},
9+
"name": "__MSG_extensionName__",
10+
"description": "__MSG_extensionDescription__",
11+
"version": "2.0.0",
12+
"author": "Martin Pecka",
13+
"homepage_url": "https://github.com/peci1/mailing-list-filter",
14+
"default_locale": "en",
15+
16+
"icons": {
17+
"64": "dev/icon.png"
18+
},
19+
20+
"legacy": {
21+
"type": "xul"
22+
}
23+
}

0 commit comments

Comments
 (0)