add: var color = taginfo.color; if (color) newMenuItem.setAttribute("class", "lc-" + color.substr(1)); 
context: function InitMessageTags(menuPopup){  var tagService = Components.classes["@mozilla.org/messenger/tagservice;1"]                             .getService(Components.interfaces.nsIMsgTagService);  var tagArray = tagService.getAllTags({});  var tagCount = tagArray.length;  // remove any existing non-static entries...  var menuseparator = menuPopup.lastChild.previousSibling;  for (var i = menuPopup.childNodes.length; i > 4; --i)    menuPopup.removeChild(menuseparator.previousSibling);  // hide double menuseparator  menuseparator.previousSibling.hidden = !tagCount;  // create label and accesskey for the static remove item  var tagRemoveLabel = gMessengerBundle.getString("mailnews.tags.remove");  SetMessageTagLabel(menuPopup.firstChild, 0, tagRemoveLabel);  // now rebuild the list  var msgHdr = gDBView.hdrForFirstSelectedMessage;  var curKeys = msgHdr.getStringProperty("keywords");  if (msgHdr.label)    curKeys += " $label" + msgHdr.label;  for (var i = 0; i < tagCount; ++i)  {    var taginfo = tagArray[i];    // TODO we want to either remove or "check" the tags that already exist    var newMenuItem = document.createElement("menuitem");    SetMessageTagLabel(newMenuItem, i + 1, taginfo.tag);    newMenuItem.setAttribute("value", taginfo.key);    newMenuItem.setAttribute("type", "checkbox");    var removeKey = (" " + curKeys + " ").indexOf(" " + taginfo.key + " ") > -1;    newMenuItem.setAttribute('checked', removeKey);    newMenuItem.setAttribute('oncommand', 'ToggleMessageTagMenu(event.target);');    menuPopup.insertBefore(newMenuItem, menuseparator);  }}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/857a29bc8d8486cf7c576b56df26903a6865079d/mailWindowOverlay.js/clean/mailnews/base/resources/content/mailWindowOverlay.js