User:9cfilorux/sectionsummaries.js

/* Restore previous appearance of section names in edit summaries */ if(document.getElementsByClassName("comment")[0]) { var comment = document.getElementsByClassName("comment"); var i;   for (i = 0; i < comment.length; i++) { if(comment[i].getElementsByClassName("autocomment")[0]) { comment[i].appendChild(comment[i].getElementsByTagName("a")[0]); comment[i].getElementsByTagName("span")[0].insertBefore(comment[i].getElementsByTagName("a")[comment[i].getElementsByTagName("a").length - 1], comment[i].getElementsByClassName("autocomment")[0]); comment[i].getElementsByClassName("autocomment")[0].innerHTML = comment[i].getElementsByTagName("a")[0].innerHTML.slice(1) + comment[i].getElementsByClassName("autocomment")[0].innerHTML; comment[i].getElementsByTagName("a")[0].innerHTML = comment[i].getElementsByTagName("a")[0].innerHTML.slice(0, 1); }   } }