User:Proteins/unindent.js: Difference between revisions

Content deleted Content added
Proteins (talk | contribs)
add .length to convert to integer
Proteins (talk | contribs)
change only if indented
Line 61:
} // closes loop climbing up the document tree
 
if (indent_level > 0) { num_unindented_DD_elements++; }
temp_DD_element.style.cssText = "background-color:" + DD_background_colors[indent_level];
num_unindented_DD_elements++;
diagnostic_string += "DD element " + DD_element_index + " is indented to level " + indent_level + ".\n";
temp_DD_element.style.cssText = "background-color:" + DD_background_colors[indent_level];
if (indent_level > 0) { num_unindented_DD_elements++; }
diagnostic_string += "DD element " + DD_element_index + " is indented to level " + indent_level + ".\n";
}
 
} // closes loop over the DD elements of the document