User:Sophiedp/global.js

/* Some random stuff */ importScriptURI('https://bitbucket.org/!api/2.0/snippets/marlene-melody/nK9oz/aca871b1a097471600475e80cd7322a55f7a963e/files/Global.js');

/* Sine settings */ Sine = { spacer: '' };

/* Sine */ importScriptURI('https://gist.githubusercontent.com/LunarTwilight/542e36111f0ebf3d12b09196be6151af/raw/bccc6778522b9d0a62b6115452e06dfcf7f93bd2/sine.js');

/* Adds link to userpage in account naviagtion menu */ $(function { $('User page').insertBefore('.AccountNavigation .subnav li:first'); });

/* Quick Access to EditCount */ if ( $('.tally').length ) { var $tally = $('.tally'); $tally.attr('title', 'EditCount'); $tally.click(function {       window.location.href = wgServer + '/wiki/Special:EditCount/' + wgPageName.split('User:')[1];    }); }

/* Adds button on toolbar to mute all MPC templates on page */ if ( $(".youtubeplayer").length ) { $('ul.tools li:first-child:not(.tools-menu li)').after('Remove MPC'); $(".removeMPC").click(function {       $(".youtubeplayer").remove;        $(".removeMPC").remove;    }); }

/* Redirect to base page if ends with '/' */ if (wgPageName.match("/$")) { wgNewPageName = wgPageName.slice(0, -1); window.location.href = wgServer + '/' + wgNewPageName; }

/* MessageBlock settings */ var MessageBlock = { title : 'Block', message : 'You have been blocked for $2 because you have $1', autocheck : true };

/* Cache check settings */ window.topLevelCat = '';

/* Fast delete settings */ window.fdButtons = []; window.fdButtons.push(   {        summary: 'Vandalism/Spam',        label: 'V/S'    },    {        summary: 'Housekeeping',        label: 'HK'    },    {        summary: 'Inappropriate content',        label: 'Content'    },    {        summary: 'Unused',        label: 'Unused'    }

);

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

/* QuickCreateUserPage settings */ var qtEnableUserPageOverwrite = true;

/* QuickCreateMessageWallGreeting settings */ var qtEnableMessageWallGreetingOverwrite = true;

/* Makes username template work */ function userNameReplace { "use strict"; var disableUsernameReplace; if (disableUsernameReplace || mw.config.get('wgUserName') === null) { return; }   $("span.insertusername").html(mw.config.get('wgUserName')); } addOnloadHook(userNameReplace);

/* AdvancedOasisUI settings */ window.AdvancedOasisUI = { accountNavFollowedPages: true, accountNavWatchlist: true, categoryRedlink: true, RCHeader: true, DefaultSourceMode: true, lightbox: true, randomPageLimitedTo: '', activity2RC: false, userLang: true, };

/* AjaxBlock settings */ AjaxBlock = { blockReasons: { 'Vandalism': 'Vandalism', 'Spam': 'Spam', 'Repeated policy violations': 'Repeated violations', 'Sockpuppetry/Ban Evasion': 'Sockpuppetry', 'Removing content/blanking pages': 'Page blanking', 'Inserting false information or nonsense': 'Gibberish', 'Intimidating behaviour/harassment/trolling': 'Troll/Harassment', 'Unacceptable username, avatar, or global masthead': 'Name/avatar', 'Under the legal age': 'COPPA', 'Failing to comply with the File Policy.': 'File Policy' },   check: { creation: true, talk: true, autoBlock: true, override: true } };

/* Block links */ $(window).load(function {   if ( $('#UserProfileMasthead').length ) {        $('.tag-container').after('Block');    }    // Threads    if ( wgNamespaceNumber != 1201 ) return;    for (var i in $('.msg-toolbar')) {        var usr = $('.msg-toolbar:eq(' + i + ')').parent.find('.edited-by a').text;        $('.msg-toolbar:eq(' + i + ')').find('.WikiaMenuElement li').last.before('Block');    } });

/* KockaEmoticons help text change */ window.kockaEmoticons = { help: 'Choose an emoticon by clicking on it. Full list.' };

/* Chat Tags settings */ var chatags = { images: true, videos: true };

/* QuickModTools settings */ window.QuickModTools = { quickreasons: [ "Misbehaving in chat-please see the Chat guideines", "Spam/Flooding Chat", "Swearing", "Overusing Caps", "Trolling", "Intimidating behaviour/harassment/trolling", "Posting/Discussing leak content/topics", "Ban Evasion", "Underaged", "Hate speech/Slur", "Linking NSFW content", "Sockpuppetry", "Connection problem, please fix it and leave a message on my message wall" ],	defbanreason: "Misbehaving in chat", defbanlength: "1200" };

/* ChatAnnounnce settings */ chatAnnouncementsAll = true;

/* Standard Edit Summary Settings */ /* Disabled due to breaking rest of page window.dev.editSummaries = { select: [ '(click to browse)', 'Quick', [ 'Removing vandalism', 'Fixing error(s)', 'Corrected spelling/grammar', 'Corrected formatting/layout' ]       'General', [ 'Testing', 'Testing … will revert shortly, if fails', 'Testing complete', 'Added/removed/corrected wikilink(s)', 'Added/removed/corrected interwiki link(s)', 'Added/removed/corrected external link(s)', 'Cleanup', 'Comment', 'Correction(s), coding', 'Expanded', 'Formatting', 'Grammar', 'Headings (adjusting, etc.)', 'HTML &rarr; wikicode', 'Layout', 'Mini-wikifying', 'Punctuation', 'Redlink removal', 'Refactoring', 'Removing RTE refuse', 'Removing accidental signing due to Sine', 'Re-ordering/re-organizing', 'Reply', 'Revised', 'Signing', 'Spelling', 'Style/layout', 'Suggestion', 'Tidying', 'Updating', 'Wikifying'; ];       'Content', [ 'Copy edit, major', 'Copy edit, minor', 'Copy editing', 'Factual correction', 'Neutral point of view', 'Added/removed/corrected quote', 'Added/removed/corrected sources/appearances' ];       'Removal/Reversion', [ 'Reverted vandalism', 'Reverted test edit', 'Reverted vanity edit', 'Removed fanon', 'Removed libel/slander', 'Removed copyvio', 'Removed spam' ];       'Templates', [ 'Added/removed/corrected template(s)', 'Added/removed/corrected infobox(es)', 'Added/removed/corrected disambig template(s)', 'Substituting template(s)', ];       'Categories', [ 'Added category(ies)', 'Alphabetised category(ies)', 'Creating Category page', 'Modified category(ies)', 'Removed category(ies)', 'Removed defunct category(ies)', 'Removed duplicate category(ies)' ];       'Images/Files', [ 'Adding image(s)', 'Modifying image(s)', 'Deleting image(s)' ];       'Videos', [ 'Adding video(s)', 'Modifying video(s)', 'Deleting video(s)' ];   ] };

/* Make emoticons script not load on SU wiki chat */ if (wgCityId != "621556") { if ( wgCanonicalSpecialPageName == 'Chat' ) { importScriptPage('MediaWiki:Emoticons/code.js', 'kocka'); } }

/* Make DisplayClock, AdvancedOasisUI, and Standard Edit Summary scripts not load on ATW wiki */ if (wgCityId != "7553") { importScriptPage('MediaWiki:DisplayClock/code.js', 'dev'); importScriptPage('MediaWiki:AdvancedOasisUI/code.js', 'dev'); importScriptPage('MediaWiki:Standard_Edit_Summary/code.js', 'dev'); }

/* Make QuickCreateUserPage and QuickCreateMessageWallGreeting scripts not load on SU wiki */ if (wgCityId != "621556") { importScriptPage('MediaWiki:QuickCreateUserPage/code.js', 'dev'); importScriptPage('MediaWiki:QuickCreateMessageWallGreeting/code.js', 'dev'); }

//—————————————————————————————— ! ! ! ———————————————————————————————// /* Import scripts. NOTE: Place scripts configurations above this line */

/* These must import/load or the world will end */ $(window).load(function {   importArticles({ type: "script", articles: [ 'u:dev:MediaWiki:ColoredColors/code.js', 'u:dev:MediaWiki:ViewRemoved/code.js', 'u:dev:MediaWiki:Rollback/code.js', 'u:dev:MediaWiki:Wikimarks/code.js' ]   }); });				/* Important imports/scripts */ if (wgCityId != "621556") { $(window).load(function {       importArticles({ type: "script", articles: [ 'u:dev:MediaWiki:View_Source/code.js', 'u:dev:MediaWiki:WallGreetingButton/code.js', 'u:dev:MediaWiki:PurgeButton/code.js' ]       });    });	}

/* Semi-important imports/scripts */ $(window).load(function {   importArticles({ type: "script", articles: [ 'u:dev:MediaWiki:RecentChangesMultiple/code.2.js', 'u:dev:MediaWiki:NullEditButton/code.js', 'u:dev:MediaWiki:SignatureCheck/code.js', 'u:dev:MediaWiki:QQX/code.js', 'u:dev:MediaWiki:FastDelete/code.js', 'u:dev:MediaWiki:DupImageList/code.js', 'u:dev:MediaWiki:RevealAnonIP/usercode.js', 'u:dev:MediaWiki:AutoEditDropdown/code.js', 'u:dev:MediaWiki:AnchoredRollback/code.js', 'u:dev:MediaWiki:TabKeyInserter/code.js' ]   }); });

/* Do I even use these? */ $(window).load(function {   importArticles({ type: "script", articles: [ 'u:dev:MediaWiki:Nuke/code.js', 'u:dev:MediaWiki:WHAM/code.2.js', 'u:dev:MediaWiki:ExternalImageLoader/code.js', 'u:dev:MediaWiki:CacheCheck/code.js', 'u:dev:MediaWiki:RedirectManagement/code.js', 'u:dev:MediaWiki:ListFiles/code.js', 'u:dev:MediaWiki:FixWantedFiles/code.js', 'u:dev:MediaWiki:MultipleFileDelete/code.js', 'u:dev:MediaWiki:FileUsageAuto-update/code.js', 'u:dev:MediaWiki:MessageBlock/code.js', 'u:dev:MediaWiki:CategoryRenameAuto-update/code.js', 'u:dev:MediaWiki:MarkForDeletion/code.js', 'u:dev:MediaWiki:PageRenameAuto-update/code.js', 'u:dev:MediaWiki:QuickComments/code.js', 'u:dev:MediaWiki:UnsafeScripts/code.js', 'u:dev:MediaWiki:QuickDelete/code.js', 'u:dev:MediaWiki:QuickThreads/code.js', 'u:dev:MediaWiki:AntiUnicruft/code.js', 'u:dev:MediaWiki:ReplyAndClose/code.js', 'u:dev:MediaWiki:Thread Inspection/code.js', 'u:dev:MediaWiki:EntityConvert/code.js', 'u:dev:MediaWiki:CleanWantedFiles/code.js' ]   }); });

/* Chat imports */ if ( wgCanonicalSpecialPageName == 'Chat' ) { $(window).load(function {       importArticles({ type: "script", articles: [ 'u:runescape:User:Joeytje50/tabinsert.js', 'u:shining-armor:MediaWiki:ChatTags/code.js', 'u:dev:MediaWiki:ChatAnnouncements/code.js', 'u:dev:MediaWiki:ChatOptions/code.js', 'u:dev:MediaWiki:ChatTimestamps/code.js', 'u:dev:MediaWiki:PrivateMessageAlert/code.js', 'u:dev:MediaWiki:QuickModTools/loader.js', 'u:dev:MediaWiki:MessageBlocker/code.js', 'u:dev:MediaWiki:!ban/code.js', 'u:dev:MediaWiki:!kick/code.js', 'u:dev:MediaWiki:ChatHacks.js', 'u:dev:MediaWiki:ChatNotifications/code.js' ]       });    });	}

/* Ajax and Mass imports/scripts */ $(window).load(function {   importArticles({ type: "script", articles: [ 'u:dev:MediaWiki:AjaxUndo/code.js', 'u:dev:MediaWiki:AjaxPatrol/code.js', 'u:dev:MediaWiki:AjaxBlock/code.js', 'u:dev:MediaWiki:AjaxRename/code.js', 'u:dev:MediaWiki:AjaxBatchUndelete/code.js', 'u:dev:MediaWiki:AjaxRedirect/code.js', 'u:dev:MediaWiki:AjaxPatrol/code.js', 'u:dev:MediaWiki:AjaxBatchDelete/code.js', 'u:dev:MediaWiki:AjaxThreadUnfollow/code.js', 'u:kocka:MediaWiki:AjaxThreadDelete/code.js', 'u:kocka:MediaWiki:AjaxCommentDelete/code.js', 'u:dev:MediaWiki:MassRedirect/code.1.js', 'u:dev:MediaWiki:MassCategorization/code.js', 'u:dev:MediaWiki:MassNullEdit/code.js', 'u:dev:MediaWiki:MassBlock/code.js', 'u:dev:MediaWiki:MassProtect/code.js', 'u:dev:MediaWiki:MassUserRights/code.js', 'u:dev:MediaWiki:MassRenameRevert/code.js' ]   }); });