User:Laaknor/monobook.js

// Probably a way better way of doing this... But got to begin somewhere

var lang_list = document.getElementById("p-lang") .getElementsByTagName('div')[0] .getElementsByTagName('ul')[0]; var listelements = lang_list.getElementsByTagName('li'); for (var i = 0; i < listelements.length; i++) { if (listelements[i].getElementsByTagName('a')[0].innerHTML == "Norsk (bokmål)") {

//     listelements[i].getElementsByTagName('a')[0].href == link) {        var no_node = document.createElement('a');        var no_linode = document.createElement('li');        no_node.appendChild(document.createTextNode("Norsk"));        no_node.setAttribute('href', listelements[i].getElementsByTagName('a')[0].href);        no_linode.appendChild(no_node);        no_linode.className='plainlinks'; //        listelements.appendChild(no_linode);

lang_list.replaceChild(listelements[i], no_linode); } // End if  } // End for