User:Sannse/monobook.js

function checklink { if(!document.title.indexOf("User contributions") == 0) return;

if(document.getElementById("contentSub").getElementsByTagName("a")[0].innerHTML == "Talk") { var link = document.getElementById("contentSub").getElementsByTagName("a")[3]; checkhref = "subip=OK&ip=" + document.getElementById("contentSub").innerHTML.substring(4,document.getElementById("contentSub").innerHTML.indexOf("(")-1);   } else {        var link = document.getElementById("contentSub").getElementsByTagName("a")[4];        checkhref = "subuser=OK&user=" + document.getElementById("contentSub").getElementsByTagName("a")[0].innerHTML;    }    var chLink = document.createElement("a");    chLink.href = "\/wiki\/Special:CheckUser?" + checkhref;    chLink.textContent = "Checkuser";    var space = insertAfter(link.parentNode, document.createTextNode(" | "), link);    insertAfter(link.parentNode, chLink, space); } function checklink2 {    if(!document.title.indexOf("User contributions") == 0) return;

if(document.getElementById("contentSub").getElementsByTagName("a")[0].innerHTML == "Talk") { var link = document.getElementById("contentSub").getElementsByTagName("a")[3]; checkhref = "subip=OK&ip=" + document.getElementById("contentSub").innerHTML.substring(4,document.getElementById("contentSub").innerHTML.indexOf("(")-1);   } else {        var link = document.getElementById("contentSub").getElementsByTagName("a")[4];        checkhref = "mode=normal&view=full&target=" + document.getElementById("contentSub").getElementsByTagName("a")[0].innerHTML;    }    var chLink = document.createElement("a");    chLink.href = "\/wiki\/Special:Lookupcontribs?" + checkhref;    chLink.textContent = "AllContribs";    var space = insertAfter(link.parentNode, document.createTextNode(" | "), link);    insertAfter(link.parentNode, chLink, space); }

function checklink3 { if(!document.title.indexOf("User contributions") == 0) return;

if(document.getElementById("contentSub").getElementsByTagName("a")[0].innerHTML == "Talk") { var link = document.getElementById("contentSub").getElementsByTagName("a")[3]; checkhref = "subip=OK&ip=" + document.getElementById("contentSub").innerHTML.substring(4,document.getElementById("contentSub").innerHTML.indexOf("(")-1);   } else {        var link = document.getElementById("contentSub").getElementsByTagName("a")[4];        checkhref = "target=" + document.getElementById("contentSub").getElementsByTagName("a")[0].innerHTML;    }    var chLink = document.createElement("a");    chLink.href = "\/wiki\/Special:LookupUser?" + checkhref;    chLink.textContent = "LookupUser";    var space = insertAfter(link.parentNode, document.createTextNode(" | "), link);    insertAfter(link.parentNode, chLink, space); }

addOnloadHook(checklink); ta['ca-checkuser'] = ['', 'CheckUser this person'];

addOnloadHook(checklink2); ta['ca-Lookupcontribs'] = ['', 'Full contribs for this person'];

addOnloadHook(checklink3); ta['ca-LookupUser'] = ['', 'User info for this person'];

// insertAfter by Volte function insertAfter(parent, node, referenceNode) { if(referenceNode.nextSibling) { return parent.insertBefore(node, referenceNode.nextSibling); } else { return parent.appendChild(node); } }

document.write(' ');