User:Basicer/helper.js

function basicer_helper { basicer_addtag(document.getElementById('p-personal').childNodes[3].childNodes[1],'li','Helper');

basicer_addSidebar([  {name: "Recent Annon. Changes", href: "/w/index.php?title=Special:RecentChanges&hideliu=1"},   {name: "New Page Backlog", href: "/w/index.php?title=Special:NewPages&dir=prev&hidepatrolled=1"}  ]);

var anonc = basicer_addtag(document.getElementById('n-recentchanges'),'a','(a)') anonc.href = "/w/index.php?title=Special:RecentChanges&hideliu=1"; anonc.title = "by Annon. Users";

}

function basicer_addSidebar(passed) {

var hpr = document.createElement('div'); hpr.className = "generated-sidebar portlet";

basicer_addtag(hpr, 'h5', 'helper'); var s = basicer_addtag(hpr, 'div', ''); s.className = 'pBody'; var u = basicer_addtag(s, 'ul', '');

for each ( var ss in passed ) { if ( !ss.href ) continue; var l = basicer_addtag(u, 'li', ''); basicer_addtag(l,'a',ss.name).href = ss.href; }

document.getElementById('column-one').insertBefore(hpr,document.getElementById('p-search')); }

function basicer_addtag(to, type, text) { var n = document.createElement(type); n.innerHTML = text; to.appendChild(n); return n; }

$(basicer_helper);