User:Dr ishmael/monobook.js

// links for admins and bcrats

function addBar { document.getElementById('p-navigation').innerHTML += ' '+ ' '+  ' Command Center '+ ' '+ 'Deletion'+ 'Copyvio'+ 'Master Log'+ 'New Pages</li>'+ '<li id=\>New Images</a></li>'+ '<li id=\>Unused Images</a></li>'+ '<li id=\>Site Notice</a></li>'+ '<li id=\>System messages</a></li>'+ '<li id=\>WikiaStats</a></li>'+ '</ul> '; }

addOnloadHook(addBar);

// Default reason for anything (to make human-robot tasks more robot-like, change depending on current task) /* function defaultReason { document.getElementById('wpReason').value = 'standardized image name' }

addOnloadHook(defaultReason); */

// add Purge

function addPurge {   var hist; var url; if (!(hist = document.getElementById('ca-history') )) return; if (!(url = hist.getElementsByTagName('a')[0] )) return; if (!(url = url.href )) return; addPortletLink('p-cactions', url.replace(/([?&]action=)history([&#]|$)/, '$1purge$2'),                  'purge', 'ca-purge', 'Purge server cache', '0'); } addOnloadHook(addPurge);

function addCredits {  var hist; var url; if (!(hist = document.getElementById('ca-history') )) return; if (!(url = hist.getElementsByTagName('a')[0] )) return; if (!(url = url.href )) return; addPortletLink('p-cactions', url.replace(/([?&]action=)history([&#]|$)/, '$1credits$2'),                 'credits', 'ca-credits', 'Display article credits', '0'); } addOnloadHook(addCredits);

// External editor tab addOnloadHook(function {   var editTab = document.getElementById("ca-edit");    if (!editTab) return;    var editURL = editTab.getElementsByTagName("a")[0].href;    addPortletLink("p-cactions", editURL + "&externaledit=true", "EE", "ca-exted", "External editor", ""); });

/**** Guild Wars Wiki Tools - GuildWiki Switch * (c) 2007 by Patrick Westerhoff [poke] */ function gwwtGuildWikiSwitch {  if ( wgNamespaceNumber < 100 ) {    var itemNode = document.createElement( 'li' ); itemNode.appendChild( document.createElement( 'a' ) ); itemNode.lastChild.href = 'http://wiki.guildwars.com/wiki/' + wgCanonicalNamespace + ':' + encodeURIComponent( wgTitle ); itemNode.lastChild.title = 'See this page on Guild Wars Wiki'; itemNode.lastChild.appendChild( document.createTextNode( 'GWW' ) ); document.getElementById( 'p-cactions' ).getElementsByTagName( 'ul' )[0].appendChild( itemNode ); } } hookEvent( 'load', gwwtGuildWikiSwitch );

/***** Custom edit buttons ****/ if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/2/23/Button_code.png", "speedTip": "Code", "tagOpen": " ", "sampleText": "foo"}

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/7/73/Button_code_nowiki.png", "speedTip": "Code+Nowiki", "tagOpen": " ", "sampleText": "foo"}

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/d/d5/Button_noinclude.png", "speedTip": "Noinclude", "tagOpen": " ", "tagClose": " ", "sampleText": "bar"}

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/gw/images/b/bf/Button_pagename.png", "speedTip": "Pagename", "tagOpen": "", "sampleText": ""}

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/central/images/4/4a/Btn_toolbar_strike.png", "speedTip": "Strikethrough", "tagOpen": " ", "tagClose": " ", "sampleText": "baz"}

}