User:Walrus068/monobook.js

// /* ADDING LINKS TO SIDEBAR if you wanna do http://www.mediawiki.org/wiki/Manual:Interface/Sidebar#Add_or_remove_sections_.28JavaScript.29

function ModifySidebar(action, section, name, link) { try { switch (section) { case "languages": var target = "p-lang"; break; case "toolbox": var target = "p-tb"; break; case "navigation": var target = "p-navigation"; break; default: var target = "p-" + section; break; }

if (action == "add") { var node = document.getElementById(target) .getElementsByTagName('div')[0] .getElementsByTagName('ul')[0];

var aNode = document.createElement('a'); var liNode = document.createElement('li');

aNode.appendChild(document.createTextNode(name)); aNode.setAttribute('href', link); liNode.appendChild(aNode); liNode.className='plainlinks'; node.appendChild(liNode); }

if (action == "remove") { var list = document.getElementById(target) .getElementsByTagName('div')[0] .getElementsByTagName('ul')[0];

var listelements = list.getElementsByTagName('li');

for (var i = 0; i < listelements.length; i++) { if (listelements[i].getElementsByTagName('a')[0].innerHTML == name ||                   listelements[i].getElementsByTagName('a')[0].href == link) {

list.removeChild(listelements[i]); }           }        }

} catch(e) { // lets just ignore what's happened return; } }

function CustomizeModificationsOfSidebar { ModifySidebar("add", "Navigation", "Recent changes", "/wiki/User:Suppa_chuppa/RecentChangesHybrid"); ModifySidebar("add", "Navigation", "New files", "/wiki/Special:NewFiles"); }

addOnloadHook(CustomizeModificationsOfSidebar);

//~

/*** BEGIN TEMPLATES SCRIPT ***/

/* For help with this script, visit http://runescape.wikia.com/wiki/User:Quarenon/Scripts/Templates */

var toolbarTemplates = []; var toolbarFillSummary = 1; var toolbarFillHeader = 0;

// Add custom templates here toolbarTemplates.push({ name: 'jpeg', ns: 'File', open: , close: , sample: '' }); toolbarTemplates.push({ name: 'gif', ns: 'File', open: , close: , sample: '' }); toolbarTemplates.push({ name: 'Anti-aliasing needed', ns: 'File', open: , close: , sample: '' }); toolbarTemplates.push({ name: 'Standard detail', ns: 'File', open: , close: , sample: '' }); toolbarTemplates.push({ name: 'Greater detail', ns: 'File', open: , close: , sample: '' }); toolbarTemplates.push({ name: 'Facial features', ns: 'File', open: , close: , sample: '' }); toolbarTemplates.push({ name: 'Lighting detail', ns: 'File', open: , close: , sample: '' }); toolbarTemplates.push({ name: 'Transparency', ns: 'File', open: , close: , sample: '' }); toolbarTemplates.push({ name: 'Translucency', ns: 'File', open: , close: , sample: '' }); toolbarTemplates.push({ name: 'Cleanup image', ns: 'File', open: , sample:  }); toolbarTemplates.push({ name: 'Delete unnecessary', ns: 'File', open: , close: , sample: '' }); toolbarTemplates.push({ name: 'Delete duplicate', ns: 'File', open: , sample:  }); toolbarTemplates.push({ name: 'Delete replaced', ns: 'File', open: , sample:  });

/* DO NOT EDIT THIS LINE! */ importScript('User:Quarenon/templates.js');

/*** END TEMPLATES SCRIPT ***/

// based off of Q's if ((wgAction == 'edit' || wgAction == 'submit') && mwCustomEditButtons) { $(function {		var prevCustomEditButtons = mwCustomEditButtons;		var prevEditButtons = mwEditButtons;

mwCustomEditButtons = []; mwEditButtons = [];

mwCustomEditButtons.push({			'imageFile': 'http://img13.imageshack.us/img13/3977/buttonheart.png',			'speedTip': 'welcome',			'tagOpen': 'Walrus068',			'tagClose': ,			'sampleText': ,			'imageId': 'smiley-heart'                       });

mwSetupToolbar; mwCustomEditButtons = prevCustomEditButtons; mwEditButtons = prevEditButtons; }); }

//automatically open ge pages in exch ns if (wgCanonicalNamespace == 'Exchange' && wgAction != 'edit' && wgAction != 'submit' && wgAction != 'history') { $(window).load(function {       $('a[href^="http://services.runescape.com/m=itemdb_rs/viewitem.ws"]').attr('id', 'nuts');        window.open($('#nuts').attr('href'));    }); } //easier to edit if (wgAction == 'edit' || wgAction == 'submit') { $(window).load(function {       $('#wpTextbox1').focus;        $('#wpSave').attr('tabindex', '1');        $('#wpSummary').attr('tabindex', '2');        $('#wpPreview').attr('tabindex', '3');        $('#wpMinoredit').attr('tabindex', '4');    }); }

//~ // jueymaedthis $(document).ready(function {   $('input#wpLeaveRedirect').removeAttr('checked') });

// shorterexchangeeditpages if ((wgAction == 'edit' || wgAction == 'submit') && wgCanonicalNamespace == 'Exchange') { $(document).ready(function {       $('textarea#wpTextbox1').attr('rows', '15');        $('div#gemw_guide').css('display', 'none');    }); }

// opens redlinks new tabs $(window).load(function {   $('a.new').attr('target', '_blank'); });

//~ importScript('User:Suppa_chuppa/hybrid.js'); //