User:Tyrannis for now/vector.js

importScript('User:MordantMaenad/scripts/markpatrolled.js'); importScript('User:MordantMaenad/scripts/hotstubcat.js'); function gettoken_api { var api = sajax_init_object; api.open('GET', wgServer + wgScriptPath + '/api.php?format=json&action=query&prop=info&indexpageids=1&intoken=edit&titles=Whatever', false); api.send(null); if(api.status==200) { var response = eval('(' + api.responseText + ')'); var token = response['query']['pages'][response['query']['pageids'][0]]['edittoken']; } else { alert('The token query returned an error.'); } return token; }

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);

function PostCP{ if (wgCanonicalSpecialPageName == "Recentchanges"){ var recent = getElementsByClassName(document.getElementById('bodyContent'),"ul","special"); var x; for (x=0;x=1;i=i-1) {    var bads=list[i].getElementsByTagName("a"); var j=0; for (j=0;j 0) {           parent.removeChild(list[i]); }    }   }  }  } } addOnloadHook(PostCP);

function Headcutoff{ if (wgCanonicalSpecialPageName == "Recentchanges"){ var recent = getElementsByClassName(document.getElementById('bodyContent'),"ul","special"); var x; for (x=0;x=1;i=i-1) {    var bads=list[i].getElementsByTagName("a"); var j=0; for (j=0;j 0) {           parent.removeChild(list[i]); }    }   }  }  } } addOnloadHook(Headcutoff);

function goaway{ if (wgCanonicalSpecialPageName == "Recentchanges"){ var recent = getElementsByClassName(document.getElementById('bodyContent'),"ul","special"); var x; for (x=0;x=1;i=i-1) {    var bads=list[i].getElementsByTagName("a"); var j=0; for (j=0;j 0) {           parent.removeChild(list[i]); }    }   }  }  } } addOnloadHook(goaway); function Robbegone{ if (wgCanonicalSpecialPageName == "Recentchanges"){ var recent = getElementsByClassName(document.getElementById('bodyContent'),"ul","special"); var x; for (x=0;x=1;i=i-1) {    var bads=list[i].getElementsByTagName("a"); var j=0; for (j=0;j 0) {           parent.removeChild(list[i]); }    }   }  }  } } addOnloadHook(Robbegone);

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:Ty") { if (anchors[5].innerHTML == "User:Ty") items[i].style.display = "none"; } } }

addOnloadHook(hidemelogs);