User:Psygremlin/monobook.js

/*function awayPeskyFloatingBox { var divs = document.getElementsByTagName("div"); for (var i = 0; i < divs.length; ++i) { if (hasClass(divs[i], "plainlinks")) { divs[i].style.display = "none"; }	} }

addOnloadHook(awayPeskyFloatingBox);

var wigoThreshold = -5;

function awayCrappyWigos { var divs = document.getElementsByTagName("div"); for (var i = 0; i < divs.length; ++i) { if (divs[i].id.substring(0, 4) == "wigo") { var voteCount = parseInt(divs[i].innerHTML); // traverse up the tree thrice, and check we've hit the table row var row = divs[i].parentNode.parentNode.parentNode; if (row.tagName == "TR" && voteCount <= wigoThreshold) { row.style.display = "none"; }		}	} }

addOnloadHook(awayCrappyWigos);

function botrollback { var rollbacklinks = getElementsByClassName(document.getElementById('bodyContent'),"*","mw-rollback-link"); var botrblinks = new Array; for (var j = 0; j< rollbacklinks.length; j++) { var rbbs = document.createElement('span'); var rba = rollbacklinks[j].getElementsByTagName('a')[0]; var rbba = document.createElement('a'); rbba.innerHTML = "bot rollback"; rbba.href = rba.href + '&bot=1'; if ( rollbacklinks[j].innerHTML[0] == "[" ) rbbs.appendChild(document.createTextNode("[")); rbbs.appendChild(rbba); if ( rollbacklinks[j].innerHTML[rollbacklinks[j].innerHTML.length-1] == "]" ) rbbs.appendChild(document.createTextNode("]")); if (rollbacklinks[j].nextSibling == undefined) { rollbacklinks[j].parentNode.appendChild(document.createTextNode(" ")); rollbacklinks[j].parentNode.appendChild(rbbs); } else { rollbacklinks[j].parentNode.insertBefore(rbbs,rollbacklinks[j].nextSibling); rollbacklinks[j].parentNode.insertBefore(document.createTextNode(rbbs.nextSibling.textContent),rbbs); }     botrblinks.push(rbbs); } for (var j = 0; j< botrblinks.length; j++) { botrblinks[j].className = "mw-rollback-link"; } }

addOnloadHook(botrollback);