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 += ' ';
// 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:
- Only moves radio buttons in replies, not in the node displayed at the top.
The text +=0 appears on its own line, instead of being at the right of its radio button (not an issue for some users). I don't know how to fix that. (Update: if the cell includes the option [select], it gets wide enough and this problem doesn't happen). (Update, more than one year later: it just struck me that adding a couple of s to the [reply] link would be enough to widen the cell and make room for the +=0, thereby fixing the bug.