User:Yuzura/global.js

/* Other */ importScriptPage('AutoEditDropdown/code.js', 'dev'); importScriptPage('PurgeButton/code.js', 'dev'); importScriptPage('RevealAnonIP/code.js', 'dev'); importScriptPage('ListFiles/code.js', 'dev'); importScriptPage('View_Source/code.js', 'dev'); importScriptPage('ReferencePopups/code.js', 'dev'); importScriptPage('PortableCSSPad/code.js', 'dev'); importScriptPage('Wikimarks/code.js', 'dev'); importScriptPage('QuickCreateUserPage', 'dev'); importScriptPage('AllPagesHideRedirect/code.js', 'dev'); importScriptPage('BackToTopButton/code.js', 'dev'); importScriptPage('AjaxBatchDelete/code.js', 'dev'); importScriptPage('SignatureCheck/code.js', 'dev'); importScriptPage('MediaWiki:Wikia.js/cancelButton.js', 'admintools'); importScriptPage('MediaWiki:Common.js/StandardEditSummaries.js', 'terraria'); /* Chat */ importScriptPage('User:Monchoman45/ChatHacks.js', 'c'); importScriptPage('User:Joeytje50/ChatPMs.js', 'c'); importScriptPage('MessageBlocker/code.js', 'dev'); importScriptPage('User:Madnessfan34537/multikick.js','cod'); importScriptPage('User:Joeytje50/tabinsert.js', 'runescape'); /*Allow Chat Mods and admins to kick users using /kick */ if (wgUserGroups.indexOf('chatmoderator')!=-1 || wgUserGroups.indexOf('sysop')!=-1) { $(function {	$('[name="message"]').keypress(function(e) { if (e.which == 13) { if (this.value.split(' ')[0] == '/kick') { e.preventDefault; var toKick = this.value.replace(/^\/kick /,'') if (!$('#WikiChatList [data-user="'+toKick+'"]').length) { confirm(toKick + ' is not in this chat. Still try to kick him?')?mainRoom.kick({name: toKick}):undefined; } else { mainRoom.kick({name: toKick}) }				this.value = ''; return true; }		}	}); }); }

/* Auto updating recent changes opt-in */ ajaxPages = ["Special:WikiActivity","Special:RecentChanges","Special:Watchlist","Special:Log","Special:Contributions"]; AjaxRCRefreshText = 'Auto-refresh'; AjaxRCRefreshHoverText = 'Automatically refresh the page'; importScriptPage('AjaxRC/code.js', 'dev');

/* Bye bye image popups */ window.wgEnableImageLightboxExt = false; function changeimagelinks { $('#WikiaArticle, .LatestPhotosModule, #article-comments').unbind('click.lightbox');

var a = document.getElementsByTagName('a'); for(var t = 0; t < a.length; ++t) { var a2 = a[t]; var img = a2.getElementsByTagName('img'); if(img[0] != null) { if (a2.href.indexOf('images.wikia.com') != -1) { var link = wgServer + '/wiki/File:' + a2.href.substring(a2.href.lastIndexOf('/') + 1); a2.setAttribute('href',link); }		}	} } addOnloadHook(changeimagelinks);