User:Spydar007/global.js

/* Chat Stuff */ if ( wgPageName == "Special:Chat" ) { importArticles({      type: 'script',       articles: [            'w:c:cod:User:Madnessfan34537/multikick.js',            'w:c:community:User:Monchoman45/ChatHacks.js',            'w:c:community:User:Joeytje50/ChatPMs.js',            'w:c:dev:AjaxEmoticons/code.js',            'w:c:dev:CapsFirst/code.js',            'w:c:dev:ChatBlockButton/code.js',            'w:c:dev:ChatInterwikiLinks/code.js',            'w:c:dev:ChatOptions/code.js',            'w:c:dev:ChatReload/code.js',            'w:c:dev:MessageBlocker/code.js',        ]    }); }; /* mw.loader.load('https://raw.githubusercontent.com/PrincessPlatinum/ChatOptions/master/ChatHacks.js'); mw.loader.load('https://raw.githubusercontent.com/PrincessPlatinum/ChatOptions/master/Multi-PM.js'); mw.loader.load('https://raw.githubusercontent.com/PrincessPlatinum/ChatOptions/master/Options-Menu.js'); mw.loader.load('https://raw.githubusercontent.com/PrincessPlatinum/ChatOptions/master/Search-Bar.js'); mw.loader.load('https://raw.githubusercontent.com/PrincessPlatinum/ChatOptions/master/Search-Bar.js'); /* END Chat Stuff */

/* Import Articles */ importArticles({   type: 'script',    articles: [        'w:c:community:User:Spydar007/editbuttons.js',        'w:c:community:User:Spydar007/icons.js',        'w:c:dev:AjaxBatchDelete/code.2.js',        'w:c:dev:AjaxRedirect/code.js',        'w:c:dev:AjaxPatrol/code.js',        'w:c:dev:AjaxUndo/code.js',        'w:c:dev:AnchoredRollback/code.js',        'w:c:dev:CategoryRenameAuto-update/code.js',        'w:c:dev:FloatingToc/code.js',        'w:c:dev:HideRail/code.js',        'w:c:dev:MassCategorization/code.js',        'w:c:dev:MassRenameRevert/code.js',        'w:c:dev:MassRedirect/code.2.js',        'w:c:dev:Message/code.js',        'w:c:dev:MessageBlock/code.js',        'w:c:dev:PageRenameAuto-update/code.js',        'w:c:dev:PurgeButton/code.js',        'w:c:dev:RedirectManagement/code.js',        'w:c:dev:RelocateEditDiscussionButtons/code.js',        'w:c:dev:RevealAnonIP/usercode.js', 'w:c:dev:Thread Inspection/code.js', 'w:c:dev:UserRightsRecord/code.js', 'w:c:dev:View Source/code.js', 'w:c:dev:WallGreetingButton/code.js', 'w:c:dev:WHAM/code.2.js', 'w:c:spydar007-test:MediaWiki:AdditionalUserTools.js', //'w:c:princess-platinum-test:MediaWiki:Stuff.js', ] }); importScriptURI('//en.wikipedia.org/w/index.php?title=User:Joeytje50/AWB.js/load.js&action=raw&ctype=text/javascript'); /* END Import Articles */

/* AdvancedOasisUI */ window.AdvancedOasisUI = { accountNavFollowedPages: true, accountNavWatchlist: true, categoryRedlink: true, RCHeader: true, lightbox: true, activity2RC: true, }; importScriptPage('AdvancedOasisUI/code.js', 'dev'); /* END AdvancedOasisUI */

/* AjaxRC */ var ajaxRefresh = 12000; var ajaxPages = ["Special:RecentChanges","Special:Watchlist","Special:Log","Special:Contributions"]; var AjaxRCRefreshText = 'Auto Refresh'; var AjaxRCRefreshHoverText = 'Automatically refreshes the page every 30 seconds'; importScriptPage('AjaxRC/code.js', 'dev'); /* END AjaxRC */

/* FileUsageAuto-update */ LIRoptions = { bottomMessage: '', editSummary: 'Updating file links', singleButtonText: 'Rename and update', queueButtonText: 'Add to queue', delay: 100 } importScriptPage('FileUsageAuto-update/code.js', 'dev') /* END FileUsageAuto-update */

/* Wikimarks */ importScriptPage('Client.js', 'wikimarks'); /* END Wikimarks */

/* MassRename */ massRenameDelay = 1000; massRenameSummary = ''; importScriptPage('MassRename/code.js', 'dev'); /* END MassRename */

/* LastEdited */ window.lastEdited = { avatar: false, size: true, diff: true, comment: true, time: 'timestamp', lang: 'en', namespaces: { include: [], exclude: [] },   pages: [] }; importScriptPage('LastEdited/code.js', 'dev'); /* END LastEdited */

/* BotoneraPopups */ importScriptURI('http://dev.wikia.com/wiki/BotoneraPopups/Code/en.js?action=raw&ctype=text/javascript&templates=expand'); importStylesheetPage('BotoneraPopups/code.css', 'dev'); /* END BotoneraPopups */

/* Adds link to contribs for logged-out people's article/blog comments */ $('.details span[title]').each(function{	var t = $(this),	title = $(this).attr("title");	t.html('Unregistered user (IP: ' + title + ')'); }); /* END Contrib links for logged-out people */

/* Making source mode default */ $(function ($) {	"use strict";	$('.wikia-menu-button a, .editsection a').each(function { var href = this.href; if (href.indexOf('action=edit') !== -1 && href.indexOf('useeditor=source') === -1) { this.href += "&useeditor=source"; }	}); }); /* END making source mode default */

/* Make Visual Editor links load the regular editor instead */ if ($.getUrlVar('veaction') == 'edit') location.replace(document.URL.replace('veaction','action')); /* END Make Visual Editor links load the regular editor instead */

/* Changing Forum links from Talk page to User page */ $("#Wall .SpeechBubble.message > .speech-bubble-avatar > a, #Wall .edited-by > a").each(function {	$(this).attr("href", mw.config.get("wgServer") + "/wiki/User:" + $(this) .attr("href") .substr((wgServer +"/wiki/").length + 1 +				$(this)					.attr("href")					.substr((wgServer +"/wiki/").length)					.split(":")[0]					.length		) ); }); /* END Changing Forum links */

/* Small Windowed Chat */ chatWindowConfigs = { url: mw.config.get("wgServer") + "/wiki/Special:Chat", title: "Wiki Chat - " + mw.config.get("wgSiteName"), config: "menubar=no, location=no, resizable=yes, scrollbars=yes, status=yes, width=600, height=600" } function openRequestedPopup { windowObjectReference = window.open(chatWindowConfigs.url, chatWindowConfigs.title, chatWindowConfigs.config); } $(document).ready(function {	$('nav.WikiNav a[data-canonical="chat"], button[onclick="ChatEntryPoint.onClickChatButton(\'/wiki/Special:Chat\')"]').attr("onclick","openRequestedPopup; return false;");	$('nav.WikiNav a[data-canonical="chat"]').removeAttr("href");	mw.util.addCSS('a[data-canonical="chat"] {cursor: hand; cursor: pointer;}'); }); /* END Small Windowed Chat */

/* Removing 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); /* END removing image popups */

/* Change Wiki Activity to Recent Changes */ function WikiActivity2RecentChanges { $('.wikia-button[data-id$="wikiactivity"]').replaceWith('Recent Changes'); } addOnloadHook(WikiActivity2RecentChanges); /* END change Wiki Activity to Recent Changes */

/* Adding checkbox to Special:ListUsers for poweruser and fb-user */ if (wgCanonicalSpecialPageName == "Listusers") $("fieldset.lu_fieldset tr:last-child").prepend('  Power Users '); if (wgCanonicalSpecialPageName == "Listusers") $("fieldset.lu_fieldset tr:last-child").prepend('  Facebook Users '); /* END adding checkbox to Special:ListUsers for poweruser and fb-user */