User:Liquidhelium/wikia.js

importScript('User:Quarenon/massrollback.js'); importScript('User:Quarenon/rcrollback.js');

$(document).ready(function {	$('.new').unbind('click'); });

/*** 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 = 1;

// Add custom templates here

/* DO NOT EDIT THIS LINE! */ /* */ /** * templates.js * * Insert various templates from the edit toolbar. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */

$(document).ready(function {	// http://www.netlobo.com/url_query_string_javascript.html	function getParam(name) {		name = name.replace(/[\[]/, '\\\[').replace(/[\]]/, '\\\]');		var regex = new RegExp('[\\?&]' + name + '=([^&#]*)'); 		var results = regex.exec(window.location.href);		if (results == null) {			return '';		} else {			return decodeURIComponent(results[1]);		}	}

function setCookie(name, value, expires) { var d = new Date; d.setDate(d.getDate + expires); document.cookie = name + '=' + escape(value) + ';path=/'; }

function getCookie(name) { if (document.cookie.length > 0) { var start = document.cookie.indexOf(name + '='); if (start != -1) { start = start + name.length + 1; var end = document.cookie.indexOf(';', start); if (end == -1) { end = document.cookie.length; }				return unescape(document.cookie.substring(start, end)); } 		}		return ''; }

// Needle and haystack should contain strings. Each element in haystack will be trimmed before comparison. function inArray(needle, haystack) { for (var i in haystack) { if (needle == $.trim(haystack[i])) { return true; }		}

return false; }

var toolbarTemplates = (window.toolbarTemplates instanceof Array) ? window.toolbarTemplates : [];

toolbarTemplates = toolbarTemplates.concat([		{ name: 'Delete', ns: '|File', open: '\n\n', sample: 'Reason' },		{ name: 'Delete Personal', ns: 'File', open: '\n\n', sample: 'Personal image' },		{ name: 'Blacklist', ns: '|File', open: '\n\n', sample: 'Reason' },		{ name: 'NPOV', ns: , open: , close: '\n\n', sample:  },		{ name: 'Move', ns: , open: '\n\n', sample: 'Page' },		{ name: 'Merge', ns: , open: '\n\n', sample: 'Page' },		{ name: 'Under construction', ns: '|User|Project', open: '\n\n', close: , sample:  },		{ name: 'Disputed', ns: , open: '\n\n', close: , sample:  },		{ name: 'Cleanup', ns: , open: '\n\n', close: , sample:  },		{ name: 'Clarify', ns: , open: , close: , sample:  },		{ name: 'Incomplete', ns: , open: '\n\n', close: , sample:  },		{ name: 'In Use', ns: '|Project', open: '\n\n', close: , sample:  },		{ name: 'Map Nomination', ns: , open: '\n\n', close: , sample: '' }, { name: 'Obsolete', ns: , open: '\n\n', close: , sample: '' }, { name: 'Protect', ns: , open: '\n\n', close: , sample: '' }, { name: 'Too Big', ns: , open: '\n\n', close: , sample: '' }, { name: 'Vote for Deletion', ns: , open: '\n\n', close: , sample: '' }, { name: 'Wikify', ns: '|Update', open: '\n\n', close: , sample:  }, { name: 'Stub', ns: , open: '\n\n', close: , sample: '' }, { name: 'Section Stub', ns: , open: '\n\n', close: , sample: '' },

{ name: 'GEMW 1', ns: 'User_talk', open: '', close: ' ~', sample: '__CONTENTPAGE__' }, { name: 'GEMW 2', ns: 'User_talk', open: '', close: ' ~', sample: '__CONTENTPAGE__' }, { name: 'Charm log 1', ns: 'User_talk', open: '', close: ' ~', sample: '__CONTENTPAGE__' }, { name: 'Charm log 2', ns: 'User_talk', open: '', close: ' ~', sample: '__CONTENTPAGE__' }, { name: 'Block', ns: 'User_talk', open: ' ~', close: , sample:  }, { name: 'Welcome Notice', ns: 'User_talk', open:  + wgUserName + , close: , sample:  }, { name: 'No Personal Images', ns: 'User_talk', open:  + wgUserName + ' ~', close: , sample: '' }, { name: 'No Vandal', ns: 'User_talk', open: ' ~', close: , sample:  }, { name: 'Error 1', ns: 'User_talk', open: '', close: ' ~', sample: '__CONTENTPAGE__' }, { name: 'Error 2', ns: 'User_talk', open: '', close: ' ~', sample: '__CONTENTPAGE__' }, { name: 'Test 1', ns: 'User_talk', open: '', close: ' ~', sample: '__CONTENTPAGE__' }, { name: 'Test 2', ns: 'User_talk', open: '', close: ' ~', sample: '__CONTENTPAGE__' }, { name: 'Test 3', ns: 'User_talk', open: '', close: ' ~', sample: '__CONTENTPAGE__' }, { name: 'Test 4', ns: 'User_talk', open: '', close: ' ~', sample: '__CONTENTPAGE__' }, { name: 'Deleted User Talk', ns: 'User_talk', open: ' ~', close: , sample:  }, { name: 'POV 1', ns: 'User_talk', open: '', close: ' ~', sample: '__CONTENTPAGE__' }, { name: 'POV 2', ns: 'User_talk', open: '', close: ' ~', sample: '__CONTENTPAGE__' }, { name: 'Vandal', ns: 'User_talk', open: '', close: ' ~', sample: 'number of offense' }, { name: 'User Edit', ns: 'User_talk', open:  + wgUserName + ' ~', close: , sample: '' }, { name: 'Don\'t Edit Userpages', ns: 'User_talk', open: '', close: ' ~', sample: '__CONTENTPAGE__' } ]);

/* Try to keep track of the last visited "content" page. */	if (wgCanonicalNamespace.search(/talk|special/gi) == -1) { var page = wgPageName.replace(/_/g, ' '); if (wgCanonicalNamespace == 'File') { page = ':' + page; }		setCookie('templatesContentReferrer', page); }

/* Append template list when editing user talk pages. */	if (wgAction == 'edit' || wgAction == 'submit') { var haveTemplates = false;

var $select = $(' ').change(function {			var i = $(this).val;

if (i == '-1') { return; }

var tpl = toolbarTemplates[i]; insertTags(tpl.open, tpl.close, tpl.sample.replace('__CONTENTPAGE__', getCookie('templatesContentReferrer')));

var fillSummary = (typeof(window.toolbarFillSummary) != 'undefined') ? window.toolbarFillSummary : true; var fillHeading = (typeof(window.toolbarFillHeading) != 'undefined') ? window.toolbarFillHeading : true; var newSection = (getParam('section') == 'new');

if ((newSection && fillHeading) || (!newSection && fillSummary)) { var summary = $('#wpSummaryEnhanced').val;

if ($.trim(summary.replace(/\/\*.*?\*\//, )) == ) { $('#wpSummaryEnhanced').val(summary + tpl.name); }			}		});

$select.append($(' ').val('-1').text('[Templates]'));

for (var i in toolbarTemplates) { var tpl = toolbarTemplates[i]; var ns = tpl.ns.toLowerCase; // normalize namespace list ns = ns.replace(/ /g, '_').replace(/main/g, '').replace(/image/g, 'file'); if (tpl.ns == '*' || inArray(wgCanonicalNamespace.toLowerCase, ns.split('|'))) { $select.append($(' ').val(i).text(tpl.name)); haveTemplates = true; }		}

if (haveTemplates) { $('#toolbar').prepend($select); }	} }); /* */

// /*** END TEMPLATES SCRIPT ***/

// appendCSS('#mw-editbutton-signature { display: none; }'); if (mwCustomEditButtons) { mwCustomEditButtons.push({		'imageFile': 'http://images.wikia.com/common/releases_201002.3/skins/common/images/button_sig.png',		'speedTip': 'Your signature with timestamp',		'tagOpen': '~',		'tagClose': ,		'sampleText': ,		'imageId': 'editbutton-customsig'	}); } //

/*** BEGIN DROPDOWN SCRIPT ***/ /* For help with this script, visit http://runescape.wikia.com/wiki/User:Quarenon/Scripts/Dropdown */ //// BEGIN custom file deletion reasons. // If you don't want to override the defaults, delete this section. var customFileDeleteDropdown = { 'Image deletion reasons': [ 'Replaced by a newer version with a different file type', 'Duplicate of an existing image', 'Personal/vanity image', 'Unnecessary image with little possibility of future use', 'Clearing file history', 'Unused in mainspace', 'Watermarked image', 'Taken from RuneScape game cache', 'Fake/Fanart', 'Abusive content'

] }; //// END custom file deletion reasons.

//// BEGIN custom page deletion reasons. // If you don't want to override the defaults, delete this section. var customPageDeleteDropdown = { 'Content': [ 'Duplicate', 'Copyright violation', 'Fanon/Player/Clan article', 'Nonsense/Spam', 'Abusive content', 'Unnecessary topic', 'Successful RFD'

],	'Administrative': [ 'Lone talk page', 'Temporary', 'Move artifact', 'Author request', 'Unnecessary redirect', 'Unregistered user page', 'Wrong namespace', 'Accidental creation', 'Unused category', 'Empty page'

]	}; //// END custom page deletion reasons.

//// BEGIN custom block reasons. // If you don't want to override the defaults, delete this section. var customBlockDropdown = { 'Common block reasons': [ 'Inserting false or deceptive information', 'Removing content from pages', 'Spamming links to external sites', 'Inserting nonsense/gibberish', 'Inserting/uploading offensive or inappropriate material', 'Intimidating behavior/harassment', 'Edit Warring/3RR Breaking', 'Abusing multiple accounts', 'Block/ban evasion', 'Unacceptable username', 'Disruption-only account', 'Creating spam/offensive pages', 'Vandalizing user pages', 'Varying/Multiple acts of vandalism' ] }; //// END custom block reasons. /* DO NOT EDIT THIS LINE! */ importScript('User:Quarenon/dropdown.js'); /*** END DROPDOWN SCRIPT ***/