User:President Dubstep/global.js

/* Multiple PMs. */ if (wgCanonicalSpecialPageName == 'Chat') { function createGroupPM { var users = prompt('Enter comma seperated list of users to start a PM with', ''); var users = users.split(','); mainRoom.openPrivateChat(users); }   $('form#Write') .append('PM'); } /* Script imports. */ batchDeleteDelay = 500; importScriptPage('AjaxBatchDelete/code.2.js', 'dev'); importArticles({   type: 'script',    articles: [        'u:dev:AjaxPatrol/code.js',        'u:dev:AjaxRC/code.js',        'u:dev:AjaxRename/code.js',        'u:dev:AjaxUndo/code.js',        'u:dev:AnchoredRollback/code.js',        'u:dev:AutoEditDropdown/code.js',        'u:dev:CacheCheck/code.js',        'u:dev:CategoryRenameAuto-update/code.js',        'u:dev:DisplayClock/code.js',        'u:dev:EditcountTag/code.js',        'u:dev:FasterBanModule/code.js',        'u:dev:HeaderLinks/code.js',        'u:dev:HideRail/code.js',        'u:dev:LastEdited/code.js',        'u:dev:Message/code.js',        'u:dev:MiniComplete/code.js',        'u:dev:NullEditButton/code.js',        'u:dev:PageMakerPro/code.js',        'u:dev:PortableCSSPad/code.js',        'u:dev:PurgeButton/code.js',        'u:dev:QQX/code.js',        'u:dev:QuickComments/code.js',        'u:dev:QuickTools/advanced.js',        'u:dev:QuickToolsv2/code.js', 'u:dev:Quick_Management/code.js', 'u:dev:RevealAnonIP/code.js', 'u:dev:RelocateEditDiscussionButtons/code.js', 'u:dev:SearchSuggest/code.js', 'u:dev:SkinSwitchButton/code.js', 'u:dev:ViewRemoved/code.js', 'u:dev:WallGreetingButton/code.js', ] }); /* End script imports. */ /* Custom edit buttoms. */ $(function { $('Special Pages') .insertBefore('.AccountNavigation .subnav li:first'); }); $(function { $('Sandbox') .insertBefore('.AccountNavigation .subnav li:first'); }); $(function { $('Status') .insertBefore('.AccountNavigation .subnav li:first'); }); $(function { $('Rights</a></li>') .insertBefore('.AccountNavigation .subnav li:first'); }); $(function { $('<a href="/wiki/Special:Leaderboard">Leaderboard</a></li>') .insertBefore('.AccountNavigation .subnav li:first'); }); $(function { $('<a href="/wiki/User blog:President Dubstep">Blog</a></li>') .insertBefore('.AccountNavigation .subnav li:first'); }); $(function { $('<a href="/wiki/Special:Chat">Chat</a></li>') .insertBefore('.AccountNavigation .subnav li:first'); }); $(function { $('<a href="/wiki/Special:Following">Following</a></li>') .insertBefore('.AccountNavigation .subnav li:first'); }); $(function { $('<a href="/wiki/Special:Contributions/President Dubstep">Contribs</a></li>') .insertBefore('.AccountNavigation .subnav li:first'); }); $(function { $('<a href="http://community.wikia.com/wiki/User:President Dubstep/global.css">Global.css</a></li>') .insertBefore('.AccountNavigation .subnav li:first'); }); $(function { $('<a href="http://community.wikia.com/wiki/User:President Dubstep/global.js">Global.js</a></li>') .insertBefore('.AccountNavigation .subnav li:first'); }); $(function { $('<a href="http://community.wikia.com/wiki/Template:User:President Dubstep">Userpage</a></li>') .insertBefore('.AccountNavigation .subnav li:first'); }); /* Custom edit buttons. */ if (mwCustomEditButtons) {   mwCustomEditButtons[mwCustomEditButtons.length] = {        "imageFile": "http://images2.wikia.nocookie.net/central/images/b/b4/Button_category03.png",        "speedTip": "Category",        "tagOpen": "[[Category:",        "tagClose": "]]",        "sampleText": "Category name"    }; } if (mwCustomEditButtons) {    mwCustomEditButtons[mwCustomEditButtons.length] = {        "imageFile": "http://images1.wikia.nocookie.net/central/images/3/3b/Button_template_alt.png",        "speedTip": "Template",        "tagOpen": "",        "sampleText": "Template"    }; } if (wgAction == "edit" || wgAction == "submit") {    /* Custom edit buttons. */    if (mwCustomEditButtons) {        mwCustomEditButtons[mwCustomEditButtons.length] = {            "imageFile": "http://images.wikia.com/central/images/c/c8/Button_redirect.png",            "speedTip": "Redirect", "tagOpen": "#redirect",           "tagClose": "", "sampleText": "PAGE" };   } } /* End custom edit buttons. */ /* Fast delete. */ var fdButtons = []; fdButtons[fdButtons.length] = { 'summary': 'Unnecessary', 'label': 'Unnec' }; fdButtons[fdButtons.length] = { 'summary': 'Not needed', 'label': 'nn' }; fdButtons[fdButtons.length] = { 'summary': 'merged/clonepage', 'label': 'm/cp' }; fdButtons[fdButtons.length] = { 'summary': 'Housekeeping', 'label': 'Housekeeping' }; /* End. */ /* Import for delete & delete and protect buttons. */ if (wgNamespaceNumber == 0) { importScriptPage('User:The Mol Man/FastDeleteProtect.js', 'a'); } else { importScriptPage('FastDelete/code.js', 'dev'); }; /* End. */ /* Change publish to save and rename to move. */ function PublishToSave { $('#wpSave') .val('Save changes'); $('a[data-id="move"]') .html('Move'); } window.onload = PublishToSave /* Extra Links to toolbar. */ $('ul.tools li:first-child') .before('<a href="http://c.wikia.com/wiki/Special:RandomWiki">Random Wiki</a></li>'); $('ul.tools li:first-child') .before('<a href="/wiki/Special:Log/block">Block Log</a></li>'); $('ul.tools li:first-child') .before('<a href="/wiki/Special:Log">Logs</a></li>'); $('ul.tools li:first-child') .before('<a href="/wiki/Special:RecentChanges?hideenhanced=1&hidelogs=1">Recent changes</a></li>');