rem: if (text) { 
add: if (text) { 
context: function FillListboxes(){  var NamedAnchorNodeList = editorShell.editorDocument.anchors;  var NamedAnchorCount = NamedAnchorNodeList.length;  if (NamedAnchorCount > 0) {    for (var i = 0; i < NamedAnchorCount; i++) {      AppendStringToList(dialog.NamedAnchorList,NamedAnchorNodeList.item(i).name);    }    haveNamedAnchors = true;  } else {    // Message to tell user there are none    AppendStringToList(dialog.NamedAnchorList,GetString("NoNamedAnchors"));    dialog.NamedAnchorList.setAttribute("disabled", "true");  }  var firstHeading = true;  for (var j = 1; j <= 6; j++) {    var headingList = editorShell.editorDocument.getElementsByTagName("h"+String(j));    if (headingList.length > 0) {      var heading = headingList.item(0);      // Skip headings that already have a named anchor as their first child      //  (this may miss nearby anchors, but at least we don't insert another      //   under the same heading)      var child = heading.firstChild;//      if( child && child.name )//        dump(child.name+" = Child.name. Length="+child.name.length+"\n");      if (child && child.nodeName == "A" && child.name && (child.name.length>0)) {        continue;      }      var range = editorShell.editorDocument.createRange();      range.setStart(heading,0);      var lastChildIndex = heading.childNodes.length;      range.setEnd(heading,lastChildIndex);      var text = range.toString();      if (text) {        // Use just first 40 characters, don't add "...",        //  and replace whitespace with "_" and strip non-word characters        text = PrepareStringForURL(TruncateStringAtWordEnd(text, 40, false));        // Append "_" to any name already in the list        if (GetExistingHeadingIndex(text) > -1)          text += "_";        AppendStringToList(dialog.HeadingsList, text);        // Save nodes in an array so we can create anchor node under it later        if (!HNodeArray)          HNodeArray = new Array(heading)        else          HNodeArray[HNodeArray.length] = heading;      }    }  }  if (HNodeArray) {    haveHeadings = true;  } else {    // Message to tell user there are none    AppendStringToList(dialog.HeadingsList,GetString("NoHeadings"));    dialog.HeadingsList.setAttribute("disabled", "true");  }}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/371c750504c530471dd186b90dde9da478c22440/EdLinkProps.js/buggy/editor/ui/dialogs/content/EdLinkProps.js