User:Ed Poor/library.js

function wikiPageName { return document.title.split(" - ")[0]; }

function go(link) { document.location = link; }

// Add a tab to make your own personal shortcut

function addLinkToTabs(command, label) {

var link = addlilink(command, label); getTabs.appendChild(link); }

function getTabs {

var firstColumn = document.getElementById('column-one'); var firstDivision = firstColumn.getElementsByTagName('div')[0]; var tabs = firstDivision.getElementsByTagName('ul')[0]; return tabs; }

// Returns  name function addlilink(url, name) { var na = document.createElement('a'); na.setAttribute('href', url);

var txt = document.createTextNode(name); na.appendChild(txt);

var li = document.createElement('li'); li.appendChild(na); return li; }