User:Abdullah5599@legacy41961806/common.js

importScript('User:Abdullah/SidebarFunctions.js');

// install Wikipedia:User:Cacycle/wikEd in-browser text editor importScriptURI('//en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js' + '&action=raw&ctype=text/javascript');

// // Personal thingies // function load { var newdiv = document.createElement('div'); var olddiv = document.getElementById('p-tb') if (skin=='monobook') {     newdiv.setAttribute('class','portlet'); newdiv.innerHTML = 'More functions'; document.getElementById("column-one").insertBefore(newdiv, olddiv.nextSibling) } if (skin=='vector') {     newdiv.setAttribute('class','portal collapsed'); newdiv.setAttribute('id','sidebarmore'); newdiv.innerHTML = 'More functions'; document.getElementById("mw-panel").insertBefore(newdiv, olddiv.nextSibling) } }

addOnloadHook(load);

//var element = document.getElementById('p-tb'); //element.addEventListener('load', sidebarmore, false);

function sidebarmore { var olddiv = document.getElementById('sidebarmore') olddiv.setAttribute('style','display:none;');

NewSidebar("custom1", "New", "toolbox"); AddLink("custom1", "My Sandbox", "/User:" + encodeURIComponent(wgUserName) + "/Sandbox"); AddLink("custom1", "New pages", "/Special:Newestpages"); AddLink("custom1", "File List", "/Special:ListFilesWithImages", "");

NewSidebar("custom2", "Attention needed", "custom1"); AddLink("custom2", "Pages needing attention", "/Category:Articles_needing_attention", ""); AddLink("custom2", "Wanted Pages", "/Special:WantedPages", ""); AddLink("custom2", "Broken Redirects", "/Special:BrokenRedirects", ""); AddLink("custom2", "Double Redirects", "/Special:DoubleRedirects", ""); AddLink("custom2", "Unused Files", "/Special:UnusedImages", ""); AddLink("custom2", "Unused Files (2)", "/User:Adam/Unused_files"); AddLink("custom2", "Delete Images", "/Category:Images_for_deletion"); AddLink("custom2", "Delete Articles", "/Category:Articles_for_deletion"); AddLink("custom2", "Obsolete Templates", "/Category:Obsolete_Templates");

NewSidebar("custom3", "Uncategorized", "custom2"); AddLink("custom3", "Pages", "/Special:UncategorizedPages", ""); AddLink("custom3", "Files", "/Special:UncategorizedFiles", ""); AddLink("custom3", "Templates", "/Special:UncategorizedTemplates", ""); AddLink("custom3", "Categories", "/Special:UncategorizedCategories", ""); }

var adminrights=new Array; var patrolrights=new Array;

importScript('MediaWiki:StaffList.js'); //Highlighting script. Based on User:ais523/highlightmyname.js. function highlightstaff(n){ //node while(n!=null){ if(n.nodeType==1&&n.tagName.toLowerCase=="a"){ //anchor

if(n.href.indexOf("/User:")!=-1){ var u=n.href.split("/User:")[1]; if(adminrights[u]==1)      n.className += " admin"; else if(patrolrights[u]==1) n.className += " patrol"; }

else if(n.href.indexOf("/index.php?title=User:")!=-1){ var u=n.href.split("/index.php?title=User:")[1]; if(adminrights[u]==1)      n.className += " admin"; else if(patrolrights[u]==1) n.className += " patrol"; }

else if(n.firstChild!=null) highlightstaff(n.firstChild); }

else{ if(n.firstChild!=null) highlightstaff(n.firstChild); }   n=n.nextSibling; } }

if (wgCanonicalNamespace == 'Special' || wgAction == 'history' || document.URL.indexOf('diff=') > 0 || document.URL.indexOf('oldid=') > 0) { addOnloadHook(function {    highlightstaff(document.getElementById('bodyContent').firstChild);  }); }