User:Spydar007/global.js

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

/* AjaxRC */ window.ajaxRefresh = 10000; window.ajaxPages = ["Special:RecentChanges","Special:Watchlist","Special:Log","Special:Contributions"]; window.AjaxRCRefreshText = 'Auto Refresh'; window.AjaxRCRefreshHoverText = 'Automatically refreshes the page every 10 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 = '';

/* QuickModTools */ QuickModTools = { quickreasons: [ "Swearing", "Spamming", "Inappropriate talk", ], }

/* UserTags */ window.UserTagsJS = { modules: {}, tags: { founder: { u:'Founder', order: 0 }, bureaucrat: { u:'Bureaucrat', link:'Project:Bureaucrats', order: 1 }, sysop: { u:'Administrator', link:'Project:Administrators', order: 2 }, rollback: { u:'Rollback', link:'Project:Rollbacks', order: 3 }, threadmoderator: { u:'Moderator', link:'Project:Moderators', order: 4 }, chatmoderator: { u:'Chat Moderator', link:'Project:Chat Moderators', order: 5 }, bot: { u:'Bot', link:'Project:Bots', order: 6 }, 'bot-global': { u:'Global Bot', order: 7 }, checkuser: { u:'Check User', link:'Help:CheckUser', order: 8 }, staff: { u:'Wikia Staff', link:'Help:Staff', order: 9 }, vstf: { u:'VSTF', link:'Help:SpamTaskForce', order: 10 }, wikiastars: { u:'Wikia Star', link:'http://www.wikia.com/Stars', order: 11 }, helper: { u:'Wikia Helper', link:'Help:Helper Group', order: 12 }, util: { u:'Wikia Utilities', order: 13 }, council: { u:'Counciler', link:'Help:Community Council', order: 14 }, voldev: { u:'Volunteer Developer', link:'http://dev.wikia.com/wiki/Volunteer_Developers', order: 15 }, authenticated: { u:'Authenticated', link:'http://community.wikia.com/wiki/Help:User_access_levels#Authenticated', order: 16 }, adminmentor: { u:'Admin Mentor', link:'http://community.wikia.com/wiki/Admin_Support%3AMain_Page', order: 17 }, 'checkuser-global': { u:'Global Check User', link:'Help:CheckUser', order: 18 }, } }; UserTagsJS.modules.mwGroups = ['bureaucrat', 'sysop', 'rollback', 'threadmoderator', 'chatmoderator', 'bot', 'bot-global', 'checkuser', 'staff', 'vstf', 'wikiastars', 'helper', 'util', 'council', 'voldev', 'authenticated', 'adminmentor', 'checkuser-global']; UserTagsJS.modules.inactive = 30;

UserTagsJS.modules.nonuser = true;

UserTagsJS.modules.autoconfirmed = true; UserTagsJS.modules.metafilter = { 'inactive': ['nonuser'], };

UserTagsJS.modules.isblocked = true;

//** 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:MediaWiki:AdvancedOasisUI/code.js',        'w:c:dev:MediaWiki:AjaxBatchDelete/code.2.js',        'w:c:dev:MediaWiki:AjaxEmoticons/code.js',        'w:c:dev:MediaWiki:AjaxPatrol/code.js',        'w:c:dev:MediaWiki:AjaxRC/code.js',        'w:c:dev:MediaWiki:AjaxRedirect/code.js',        'w:c:dev:MediaWiki:AjaxUndo/code.js',        'w:c:dev:MediaWiki:AnchoredRollback/code.js',        'w:c:dev:MediaWiki:AutoEditDropdown/code.js',        'w:c:dev:MediaWiki:CapsFirst/code.js',        'w:c:dev:MediaWiki:CategoryRenameAuto-update/code.js',        'w:c:dev:MediaWiki:ChatBlockButton/code.2.js',        'w:c:dev:MediaWiki:ChatInterwikiLinks/code.js', 'w:c:dev:MediaWiki:ChatOptions/code.js', 'w:c:dev:MediaWiki:FindAndReplace/code.js', 'w:c:dev:MediaWiki:FileUsageAuto-update/code.js', 'w:c:dev:MediaWiki:FloatingToc/code.js', 'w:c:dev:MediaWiki:HideRail/code.js', 'w:c:dev:MediaWiki:LastEdited/code.js', 'w:c:dev:MediaWiki:MassCategorization/code.js', 'w:c:dev:MediaWiki:MassRedirect/code.2.js', 'w:c:dev:MediaWiki:MassRename/code.js', 'w:c:dev:MediaWiki:MassRenameRevert/code.js', 'w:c:dev:MediaWiki:MessageBlocker/code.js', 'w:c:dev:MediaWiki:MessageBlock/code.js', 'w:c:dev:MediaWiki:Message/code.js', 'w:c:dev:MediaWiki:PageRenameAuto-update/code.js', 'w:c:dev:MediaWiki:PurgeButton/code.js', //	'w:c:dev:MediaWiki:QuickModTools/loader.js', 'w:c:dev:MediaWiki:RecentChangesMultiple/code.js', 'w:c:dev:MediaWiki:RedirectManagement/code.js', 'w:c:dev:MediaWiki:RelocateEditDiscussionButtons/code.js', 'w:c:dev:MediaWiki:RevealAnonIP/usercode.js', 'w:c:dev:MediaWiki:Thread_Inspection/code.js', 'w:c:dev:MediaWiki:UserTags/code.js', 'w:c:dev:MediaWiki:View Source/code.js', 'w:c:dev:MediaWiki:WallGreetingButton/code.js', 'w:c:dev:MediaWiki:WHAM/code.2.js', 'w:c:dev:MediaWiki:WikiaNavBarHider/code.js', 'u:dev:MediaWiki:Wikimarks/code.js', 'w:c:spydar007:MediaWiki:AdditionalUserTools.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 ');