User:Lost Labyrinth/wikia.js

/* Rollback all */ $(function {	if ($('span.mw-rollback-link').size > 0 && wgCanonicalSpecialPageName && wgCanonicalSpecialPageName == 'Contributions') {		var selector = '';		switch (skin) {			case 'monobook':	selector = '#p-cactions ul:first';	break;			case 'monaco':		selector = '#page_bar ul:first';	break;			case 'oasis': 		selector = '#my-tools-menu';		break;			default: 		return;							}		// TODO: Use jquery and add only if skin == monaco		appendCSS('body.masthead-special #page_bar {height: auto !important;}');		$(selector).prepend( $(' ').append(				$('').attr({ 'href': '#', 'id': 'ca-rollbackall', 'title': 'Rollback all edits displayed here.' }).click(function { for (var i in document.links) { if (document.links[i].href.indexOf('action=rollback') != -1) { window.open(document.links[i].href); }   					}				}).text('Rollback all').css({ })			)		);	} });

/* Admin buttons */ if (wgAction == "edit" || wgAction == "submit") { if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/sims/images/0/02/Blocked_button.png", "speedTip": "Blocked Template", "tagOpen": "", "sampleText": "REASON" };		mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://images.wikia.com/sims/images/7/79/Warn_button.png", "speedTip": "Warning Template", "tagOpen": "~"+""+"~", "sampleText": "" };	} }

/* Fast delete */ importScriptPage( 'FastDelete/code.js', 'dev' ); var fdButtons = []; fdButtons[fdButtons.length] = { 'summary': 'Vandalism', 'label': 'V' }; fdButtons[fdButtons.length] = { 'summary': 'Nonsense', 'label': 'N' }; fdButtons[fdButtons.length] = { 'summary': 'Fanon not improved in a reasonable amount of time. If you want it back, let me know', 'label': 'FNI' }; fdButtons[fdButtons.length] = { 'summary': 'Fanon belonging to a permanently banned user', 'label': 'FPU' }; fdButtons[fdButtons.length] = { 'summary': 'Spam', 'label': 'S' }; fdButtons[fdButtons.length] = { 'summary': 'No longer needed', 'label': 'NLN' };

/* Kill image popup */ $(function changeimagelinks {   if (window.skin == 'oasis') {        var article = $('#WikiaArticle, .LatestPhotosModule, #article-comments');    }    else {        var article = $('#bodyContent');    }    article.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("wikia.nocookie.net") != -1 ) {                var link = wgServer + '/wiki/File:' + a2.getAttribute('data-image-name');                a2.setAttribute('href',link);            }        }    } });

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