User:Vipermagi/monobook.js

// ***** ADDITIONAL LINKS *****

function addBar { document.getElementById('p-navigation').innerHTML += ' '+ ' '+  ' Admin links '+ ' '+ 'Deletion Candidates'+ 'Banning Candidates'+ 'Logs'+ 'New Pages</li>'+ '<li id=\>New Images</a></li>'+ '<li id=\>Block User</a></li>'+ '<li id=\>Prefix Index</a></li>'+ '<li id=\>Random Redirect</a></li>'+ '</ul> '; } //Close addBar addOnloadHook(addBar); //Call addBar on load

//WIKISWAP

function importScript(page, lang) { var url = wgScriptPath + '/index.php?title=' + encodeURIComponent(page.replace(' ','_')) + '&action=raw&ctype=text/javascript&dontcountme=s'; if (lang) url = 'http://' + lang + '.wikipedia.org' + url; var s = document.createElement('script'); s.src = url; s.type='text/javascript'; document.getElementsByTagName('head')[0].appendChild(s); }

//WikiSwap importScript('User:AT/wikiswap.js');

function createSkillDescToggleButton {	var descHead= document.getElementById("descHead"); // var descFull = document.getElementById('descFull'); // var descCon = document.getElementById('descCon');  // if (descHead && descFull && descCon) { var descToggle = document.createElement("a"); descToggle.style.textAlign= "right"; descToggle.style.fontWeight = "normal"; descToggle.style.fontSize = "smaller"; descToggle.setAttribute('id', 'descToggle'); descToggle.setAttribute('href', 'javascript:toggleSkillDesc;');

var cookiePos = document.cookie.indexOf("showconcise="); var descToggleText; if (cookiePos > -1 && document.cookie.charAt(cookiePos + 12) == 1) { // If showconcise is set, show the concise description... descToggleText = document.createTextNode(descShowFull); descFull.style.display = 'none'; descCon.style.display = 'block'; } else { // ...otherwise show the full description by default descToggleText = document.createTextNode(descShowCon); descFull.style.display = 'block'; descCon.style.display = 'none'; }		descToggle.appendChild(descToggleText); descHead.appendChild(descToggle); } } addOnloadHook( createSkillDescToggleButton );

//Based on toggleToc in http://guildwars.wikia.com/wiki/MediaWiki:Common.js/Toggler

function toggleSkillDesc { var descFull = document.getElementById('descFull'); // var descCon = document.getElementById('descCon');  // var toggleLink = document.getElementById('descToggle'); // 

if (descFull && descCon && toggleLink) { if (descFull.style.display == 'none') { changeText(toggleLink, "show concise descriptions"); descFull.style.display = 'block'; descCon.style.display = 'none'; document.cookie = "showconcise=0"; } else { changeText(toggleLink, "show full descriptions"); descFull.style.display = 'none'; descCon.style.display = 'block'; document.cookie = "showconcise=1"; }	} }