User:Proteins/unindent.js: Difference between revisions

Content deleted Content added
Proteins (talk | contribs)
change the DOM tree; still need to delete old elements
Proteins (talk | contribs)
new background colors
Line 26:
 
// Colors to help sighted people after the unindenting
var num_colors = 0;
var DD_background_colors = ["blackwhite", "redyellow", "bluegreenyellow", "greengold", "magenta", "cyanlawngreen", "orange", "purple", "darkgreenlightskyblue", "browndarkorange"];
 
 
// Initialization
num_colors = DD_background_colors.length;
 
top_node = document.getElementById('bodyContent');
Line 67 ⟶ 71:
if (indent_level > 0) {
num_unindented_DD_elements++;
temp_DD_element.style.cssText = "background-color:" + DD_background_colors[indent_level%num_colors];
diagnostic_string += "DD element " + DD_element_index + " is indented to level " + indent_level + ".\n";
if ((top_DD_node) && (top_DL_node)) {