User:Proteins/unindent.js: Difference between revisions

Content deleted Content added
Proteins (talk | contribs)
different approach to unindenting
Proteins (talk | contribs)
try to skip over DD elements that only carry out formatting
Line 52:
if (!num_child_nodes) { continue; } // ignore empty DD elements
 
untagged_text = temp_DD_element.innerHTML.replace(/(<dl([^>]+)>)(.*?<\/dl>)/ig,""); // remove HTMLinner tagsDL's
untagged_text = untagged_text.replace(/(<([^>]+)>)/ig,""); // remove other HTML tags
byte_count = untagged_text.replace(/\s/ig, "").length; // remove whitespaces
if (byte_count < 1) { continue; }