User:Joeytje50/common.js

/***************************************** If you see this and also want to have one page for all your scripts: remember to place the following on your wikia.js and monobook.js files:

importScript('User: /common.js');



//Imports

importScript('User:Quarenon/exchangewatch.js'); importScript('User:Suppa_chuppa/hybrid.js'); importScript('User:Joeytje50/dupes.js'); importScript('User:Joeytje50/price.js');

var excludeuser = "Joeytje50"; importScript('User:Joeytje50/watchlist.js');

var cgwatch1 = "Speedy deletion candidates"; var cgwatch2 = "Requests for comment"; importScript('User:Joeytje50/categories.js');

//Allowing longer summaries

$(document).ready(function{	$('wpSummary').attr('maxlength', '250'); })

//attributes stuff $(document).ready(function{	$('.wordmark a').removeAttr('accesskey')	$('.mw-rollback-link a').attr('accesskey', 'z')	$('input[name="wpMove"]').attr('accesskey', 's')	$('textarea#wpFilterRules').removeAttr('readonly') })

//Function for making it easier to filter an input from certain characters. When the characters in the regex (or string) are found in the input, they are removed after moving back up the key.

function filter(regex, selector) { $(selector).keyup(function {		if ($(selector).val.search(regex) != '-1') {			$(selector).val($(selector).val.replace(regex, ''))		}	}) }

/*** 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: 'Vandalism', ns: 'User talk', open: '', close: ' ~', sample: '__CONTENTPAGE__' }); toolbarTemplates.push({ name: 'Welcome', ns: 'User talk', open: , sample:  }); toolbarTemplates.push({ name: 'Infobox Item', ns: 'Main', open: , sample:  }); toolbarTemplates.push({ name: 'Infobox Monster', ns: 'Main', open: , sample:  }); toolbarTemplates.push({ name: 'Infobox NPC', ns: 'Main', open: , sample:  }); toolbarTemplates.push({ name: 'User page with red links leading to it', ns: 'User', open: , close: , sample: '' }); toolbarTemplates.push({ name: 'IP editing userpage', ns: 'User talk', open: 'Please remember to log in before editing userpages.', close: '~', sample: ''}) toolbarTemplates.push({ name: 'Minor glitch image deletion', ns: 'File', open: '', sample: 'Minor glitch image' }); toolbarTemplates.push({ name: 'Personal image deletion', ns: 'File', open: '', sample: 'Personal/vanity image' }); toolbarTemplates.push({ name: 'Unnecessary image deletion', ns: 'File', open: '', sample: 'Unnecessary image' }); toolbarTemplates.push({ name: 'Duplicate image deletion', ns: 'File', open: '', sample: 'Duplicate' }); /* DO NOT EDIT THIS LINE! */ importScript('User:Quarenon/templates.js'); // /*** END TEMPLATES SCRIPT ***/

$('document').ready(function {	$('#toolbar select').length?$('.wordmark a').removeAttr('accesskey'):'';	$('#toolbar option[value="0"]').attr('accesskey', 'v') })

/*** BEGIN AUTO CVU SCRIPT ***/ // Enables automatic submission of edits. Change to 0 to disable. var autoCvuSubmit = 0; /* DO NOT EDIT THIS LINE! */ importScript('User:Quarenon/autocvu.js'); /*** END AUTO CVU SCRIPT ***/ /*** BEGIN AUTO WELCOME SCRIPT ***/ // /* For help with this script, visit http://runescape.wikia.com/wiki/User:Quarenon/Scripts/Autowelcome */ /* Your user welcome text. Unless you have your own welcoming text/template, just use the default. */ var autoWelcomeText = ''; var autoWelcomeSummary = 'Welcome'; /* DO NOT CHANGE THIS LINE! */ importScript('User:Quarenon/autowelcome.js'); // /*** END AUTO WELCOME SCRIPT ***/

//Ticker script. Put on a page with this script to create a very simple ticker: every click it adds one.

$(document).ready(function{	$('#ticker').html(' Tick ')	$('#tick').click(function { var count = $('#count').val count++ $('#count').val(count) })	filter(/[^0-9]/g, '#count') })

$(document).ready(function { if ($('pre.source-javascript').length != 0) {	$('pre.source-javascript').html($('pre.source-javascript').html.replace(/?(\(|{)/g, ' $&').replace(/\)|}/g, '$& '))	$('head').append('.source-javascript .JSgroup:hover {background-color:rgba(50, 50, 50, 0.1);} ')	$('pre.source-javascript').click(function { if ($('style.JSEffects').html.replace(/^(..).*/, '$1') != '/*') { $('style.JSEffects').html('/*' + $('style.JSEffects').html + '*/') } else { $('style.JSEffects').html($('style.JSEffects').html.replace(/\/\*|\*\//, '')) }	}) } })