http://qs321.pair.com?node_id=740375


in reply to Voting buttons at bottom rather than top?

This is my incomplete implementation, to be used from the free nodelet. It moves the radio button to the cell at the right, above the options [reply], [/msg], [d/l] and such.

<script language="Javascript"> // reparent voting radio buttons var replies_table = document.getElementById ('replies_table'); if (replies_table) { var divs = replies_table.getElementsByTagName ('div'); for (var i = divs.length - 1; i >= 0; i--) { var node = divs`[i`]; var class = node.getAttribute('class'); if ('vote' != class) { continue; } var dest = node.parentNode.nextSibling; // remove <center> tag node.innerHTML = node.firstChild.innerHTML; // discard spacing between <label>s var children = node.childNodes; for (var j = children.length - 1; j >= 0; j--) { var c = children`[j`]; //alert (c.tagName + ' ' + c.innerHTML); if ('LABEL' != c.tagName) { node.removeChild (c); continue; } } // insert <br>s between <label>s for (var j = children.length - 1; j >= 1; j--) { node.insertBefore (document.createElement ('br'), children +`[j`]); } // add a couple of nbsp's to make the cell wider in // order to make room for the "+=0" vote option dest.firstChild.innerHTML += '&nbsp;&nbsp;&nbsp;'; // add the vote buttons div to the cell at the right dest.insertBefore (node, dest.firstChild); // appendChild (no +de); //alert ('index (' + i + ') class (' + class + ') dest.innerHT +ML (' + dest.innerHTML + ')'); } } </script>

Things to be improved:

--
David Serrano

Replies are listed 'Best First'.
Re^2: Voting buttons at bottom rather than top?
by jvector (Friar) on Jan 31, 2009 at 13:45 UTC
    Thank you .. works for me ;-)

    404: signature : not found