User:Proteins/unindent.js: Difference between revisions

Content deleted Content added
Proteins (talk | contribs)
more diagnostics to identify failure modes
Proteins (talk | contribs)
enforce diagnostics
Line 49:
for (DD_element_index=0; DD_element_index<num_DD_elements; DD_element_index++) {
temp_DD_element = DD_elements[DD_element_index];
 
num_sub_DL_elements = temp_DD_element.getElementsByTagName("DL");
 
// Skip empty DD elements
Line 61 ⟶ 63:
if (byte_count < 1) { continue; }
 
num_sub_DL_elements = temp_DD_element.getElementsByTagName("DL");
 
// Find the topmost DL element for this DD node
Line 94 ⟶ 95:
temp_DD_element.style.cssText = "background-color:" + DD_background_colors[indent_level%num_colors];
 
indent_level_string = "(Indent level " + indent_level + " " + num_sub_DL_elements + ") ";
if (num_sub_DL_elements > 0) {
indent_level_string += "[ " + num_sub_DL_elements + " " + byte_count + " " + unspaced_text + " ]";