User:Blue/vector.js

//importScript('User:Blue/scripts/contemplinks.js'); //importScript('User:MordantMaenad/scripts/markpatrolled.js'); importScript('User:Nx/Scripts/Botwarn.js'); /*importScript('User:Blue/scripts/hotstubcat.js');*/ //importScript('User:Blue/scripts/watchuser.js'); //importScript('User:Blue/scripts/hotarticlerate.js'); //importScript('User:Blue/scripts/alertmods.js');

// modified from User:Nx/Scripts/botrollback.js, hacked for my personal preferences

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 = "as bot"; rbba.href = rba.href + '&bot=1'; if ( rollbacklinks[j].innerHTML[0] == "[" ) { rbbs.appendChild(document.createTextNode("[")); var blue_hack = document.createElement('a'); blue_hack.innerHTML = "rollback"; blue_hack.className = "mw-rollback-link"; blue_hack.href = rba.href; rbbs.appendChild(blue_hack); 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); rollbacklinks[j].parentNode.removeChild(rollbacklinks[j]); } 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);

// end from Nx

// hides user rights items in which I change my own groups

function hidemelogs { var items = getElementsByClassName(document.getElementById('bodyContent'),"*","mw-logline-rights"); for (var i = 0; i < items.length; i++) { var anchors = items[i].getElementsByTagName('a'); if (anchors[1].title == "User:Blue") { if (anchors[5].innerHTML == "User:Blue") items[i].style.display = "none"; } } }

addOnloadHook(hidemelogs);