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 ***/

// jueymaedthis $(window).load(function{ $('input#wpLeaveRedirect').removeAttr('checked') });

//auto-warn based off of Q's auto welcome var autoWelcomeText =  + + ; if (wgCanonicalNamespace == 'User_talk' && wgAction == 'edit' && wgArticleId === 0 && wgTitle.split('.').length != 4 && wgTitle.indexOf('/') == -1) { $(document).ready(function {		$('#wpTextbox1').val((typeof(window.autoWelcomeText) == 'undefined') ?  +  + '' : window.autoWelcomeText);		$('#wpSummary,#wpSummaryEnhanced').val((typeof(window.autoWelcomeSummary) == 'undefined') ? 'warn' : window.autoWelcomeSummary);	}); }

// based off of Q's smiley buttons 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; }); }

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