Difference between revisions of "Team:Czech Republic/Template:Scripts"
Line 33: | Line 33: | ||
for (var i = 0; i < len; i++) { | for (var i = 0; i < len; i++) { | ||
var elem = paragraphs[i]; | var elem = paragraphs[i]; | ||
− | if (elem.innerHTML.trim() == '<br>') { | + | if (elem.innerHTML.trim() == '<br>') |
+ | { | ||
elem.parentNode.removeChild(elem); | elem.parentNode.removeChild(elem); | ||
i--; | i--; | ||
len--; | len--; | ||
+ | continue; | ||
+ | } | ||
+ | if (elem.innerHTML.trim() == '') | ||
+ | { | ||
+ | elem.parentNode.removeChild(elem); | ||
+ | i--; | ||
+ | len--; | ||
+ | continue; | ||
} | } | ||
} | } |
Revision as of 16:11, 15 September 2015