User:Spydar007/global.js

//** 1 - Configuration **// /* AdvancedOasisUI */ window.AdvancedOasisUI = { accountNavFollowedPages: true, accountNavWatchlist: true, categoryRedlink: true, RCHeader: true, lightbox: true, activity2RC: true, };

/* 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';

/* AutoEditDropdown */ window.AutoEditDropdownConfig = { expandedAreaContribute: true, expandedAreaEdit: true };

/* FileUsageAuto-update */ LIRoptions = { bottomMessage: '', editSummary: 'Updating file links', singleButtonText: 'Rename and update', queueButtonText: 'Add to queue', delay: 100 };

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

/* MassRename */ massRenameDelay = 1000; massRenameSummary = '';

//** 2 - Import **// importArticles({   type: 'script',    articles: [        'w:c:cod:User:Madnessfan34537/multikick.js',        'w:c:community:User:Joeytje50/ChatPMs.js',        'w:c:community:User:Monchoman45/ChatHacks.js',        'w:c:community:User:Spydar007/icons.js',        'w:c:dev:AdvancedOasisUI/code.js',        'w:c:dev:AjaxBatchDelete/code.2.js',        'w:c:dev:AjaxEmoticons/code.js',        'w:c:dev:AjaxPatrol/code.js',        'w:c:dev:AjaxRC/code.js',        'w:c:dev:AjaxRedirect/code.js',        'w:c:dev:AjaxUndo/code.js',        'w:c:dev:AnchoredRollback/code.js',        'w:c:dev:AutoEditDropdown/code.js',        'w:c:dev:CapsFirst/code.js',        'w:c:dev:CategoryRenameAuto-update/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:FileUsageAuto-update/code.js', 'w:c:dev:FloatingToc/code.js', 'w:c:dev:HideRail/code.js', 'w:c:dev:LastEdited/code.js', 'w:c:dev:MassCategorization/code.js', 'w:c:dev:MassRedirect/code.2.js', 'w:c:dev:MassRename/code.js', 'w:c:dev:MassRenameRevert/code.js', 'w:c:dev:MessageBlocker/code.js', 'w:c:dev:MessageBlock/code.js', 'w:c:dev:Message/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:dev:WikiaNavBarHider/code.js', 'w:c:spydar007:MediaWiki:AdditionalUserTools.js', 'w:c:wikimarks:Client.js', ] }); importScriptURI('//en.wikipedia.org/w/index.php?title=User:Joeytje50/AWB.js/load.js&action=raw&ctype=text/javascript');

//** 3 - Other Stuff **// /* adding link to contribs for anons article/blog comments */ $('.details span[title]').each(function{	var t = $(this),	title = $(this).attr("title");	t.html('Unregistered user (IP: ' + title + ')'); });

/* 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"; }	}); });

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

/* 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		) ); });

/* 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;}'); });

/* 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);

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

/* 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 ');