User:Wugapodes/Add tools links.js

//Sidebar links var makeLink = function(title, target, tooltip) { var link = document.createElement("a"); link.setAttribute("href","/wiki/".concat(target)) link.setAttribute("title",tooltip) link.innerHTML = title var tID = "t-".concat(title); var listItem = document.createElement("li"); listItem.setAttribute("id",tID) listItem.appendChild(link) return(listItem) }

var addToolsLink = function(title, target, tooltip) { var tools = document.getElementById("p-tb").getElementsByTagName("ul")[0] var link = makeLink(title, target, tooltip) tools.appendChild(link) }

addToolsLink('WugBot','User:WugBot','My bot.'); addToolsLink('JavaScript','User:Wugapodes/common.js','My common.js page.'); addToolsLink('Capricorn','User:Wugapodes/Capricorn','Redirect script doc page.'); addToolsLink('Pending changes', 'Special:PendingChanges', 'Queue of revisions awaiting review.'); addToolsLink('Page curation', 'Special:NewPagesFeed', 'New page curation feed.');