Sort styles by name in manage

This commit is contained in:
Jason Barnabe 2015-01-30 11:32:14 -06:00
parent 16abc9c19d
commit e5d50b02e7

View File

@ -10,6 +10,7 @@ appliesToExtraTemplate.innerHTML = " " + t('appliesDisplayTruncatedSuffix');
chrome.extension.sendMessage({method: "getStyles"}, showStyles);
function showStyles(styles) {
styles.sort(function(a, b) { return a.name.localeCompare(b.name)});
var installed = document.getElementById("installed");
styles.map(createStyleElement).forEach(function(e) {
installed.appendChild(e);