User:JayJayJohnson/global.js

/* Monchomans chat hacks */ importScriptPage('User:Monchoman45/ChatHacks.js', 'c');

if (wgUserGroups.indexOf('chatmoderator')!=-1 || wgUserGroups.indexOf('user')!=-1) { createAlias('kick', 13, function(toKick,e) {		if ($('#WikiChatList [data-user="'+toKick+'"]').length) {			mainRoom.kick({name: toKick})		} else {			if (confirm(toKick + ' is not in this chat. Still try to kick him?')) mainRoom.kick({name: toKick});		}		e.target.value = '';	}); } if (wgUserGroups.indexOf('user')!=-1) { createAlias('block', 13, function(toBan,e) {		if (confirm('Are you really sure you want to block '+toBan+' permanently from the wiki, and kick them from this chat? Note: seperate the username and the block reason with a comma.')) {			toBan = toBan.split(',');			reason = toBan.slice(1).join(' ');			$.post('runescape.wikia.com/api.php?action=block&user='+toBan[0]+'&expiry=infinite&nocreate=true&noemail=true&reason='+encodeURIComponent(reason))			mainRoom.kick({name: toBan[0]})		}	}) }

// // ***************************************************************** // Load various external scripts // ***************************************************************** importScriptPage('User:Sannse/forumtools.js', 'community'); importScriptPage('User:Splarka/contribtools.js', 'community'); importScriptPage('FastDelete/code.js', 'dev'); importScriptPage('User:Sannse/Imagelisttools.js', 'community'); // ***************************************************************** // Custom automatic delete buttons // ***************************************************************** // Adds customizable one-click deletion buttons to any deletable page. // Requires w:User:Splarka/fastdelete.js in appendScript; var fdButtons = []; fdButtons[fdButtons.length] = { 'summary': 'Spam', 'label': 'spam'}; fdButtons[fdButtons.length] = { 'summary': 'Vandalism', 'label': 'vandalism'}; fdButtons[fdButtons.length] = { 'summary': 'Broken image', 'label': 'broken'}; // end Custom automatic delete buttons if(wgNamespaceNumber!=-1) addOnloadHook(function { addPortletLink('p-cactions','/wiki/Special:Prefixindex/' + escape(wgPageName),'Subpages','ca-subpages','Show subages of ' + wgPageName); }); //WHAM importScriptPage('User:Joeyaa/wham.js','vstf'); //gear fixer (from uberfuzzy) $('a[data-name="customize"]').html( function{ return $(this).parent.find('img').detach } ); //ForcePreview importScriptURI('https://internal.wikia-inc.com/index.php?title=MediaWiki:ForcePreview.js&action=raw&ctype=text/javascript'); //CU tweak importScriptURI( 'https://internal.wikia-inc.com/index.php?title=MediaWiki:CU.js&action=raw&ctype=text/javascript' ); //