User:Tyilo/navbar.js

var after = document.getElementById('pt-userpage').nextSibling; for(var i = 0; i < navbar.length; i++) {	var li = document.createElement('li'); var a = document.createElement('a'); a.textContent = navbar[i].title.replace(/\$user/g, wgUserName); var article = navbar[i].article.replace(/\$user/g, wgUserName); var url; if(navbar[i].action && navbar[i].action != 'view') {		url = 'index.php?title=' + article + '&action=' + navbar[i].action; }	else {		url = '/wiki/' + article; }	a.setAttribute('href', url); li.appendChild(a); after.parentNode.insertBefore(li, after); }