| Index: chrome/content/ui/composer.js |
| =================================================================== |
| --- a/chrome/content/ui/composer.js |
| +++ b/chrome/content/ui/composer.js |
| @@ -113,19 +113,17 @@ function init() |
| addSuggestion(item.location); |
| E("patternGroup").value = ""; |
| } |
| if (Prefs.composer_default == 0) |
| E("customPattern").focus(); |
| else |
| E("patternGroup").focus(); |
| - let types = []; |
| - for (let type of Policy.localizedDescr.keys()) |
| - types.push(type); |
| + let types = Array.from(Policy.contentTypes); |
| types.sort(); |
| let docDomain = item.docDomain; |
| let thirdParty = item.thirdParty; |
| if (docDomain) |
| docDomain = docDomain.replace(/^www\./i, "").replace(/\.+$/, ""); |
| if (docDomain) |
| @@ -139,17 +137,17 @@ function init() |
| let isDefaultType = (RegExpFilter.typeMap[item.typeDescr] & defaultTypes) != 0; |
| for (let type of types) |
| { |
| if (type == "ELEMHIDE") |
| continue; |
| let typeNode = document.createElement("checkbox"); |
| typeNode.setAttribute("value", type.toLowerCase().replace(/\_/g, "-")); |
| - typeNode.setAttribute("label", Policy.localizedDescr.get(type).toLowerCase()); |
| + typeNode.setAttribute("label", Utils.getString("type_label_" + type.toLowerCase())); |
| let typeMask = RegExpFilter.typeMap[type]; |
| typeNode._defaultType = (typeMask & defaultTypes) != 0; |
| if ((isDefaultType && typeNode._defaultType) || (!isDefaultType && item.type == type)) |
| typeNode.setAttribute("checked", "true"); |
| if (item.type == type) |
| typeNode.setAttribute("disabled", "true"); |