User:Raz Mail/global.js

/*All codes are taken from UCP wiki :P*/ /* Raz Mail's Code from the Dev Fandom. */ /*THIS CODE IS TAKEN FROM COMMUNITY FANDOM. SOME ADDONS MAY OR MAY NOT WORK.*/ /*************** JAVASCRIPT ENHANCEMENTS - LAST UPDATED 5/08/2022 ***********************/ importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:BlogLink/code.js', // Adds links to user's blog, contribs, and activity.        'u:dev:MediaWiki:Discussions Delete All/code.js', // Button on Special:Contributions that will delete all Discussions posts        'u:dev:MediaWiki:DiscussionsViewer.js', // Button on Special:Contributions that lists all posts and replies by user in a modal        'u:dev:MediaWiki:DiscussionsActivity.js', // Creates a special page for latest Discussions messages        'u:dev:MediaWiki:ImprovedFooter/code.js', // Improves the design of the global Fandom footer (added a LOOOONG time ago, not sure if it does anything anymore)        'u:dev:MediaWiki:AdminDashboard block/code.js', // Adds a button with a link to list of blocked users in admin dashboard.        'u:dev:MediaWiki:PortableCSSPad/code.js', // self explanatory, css pad for testing 'u:dev:MediaWiki:AbuseLogRC.js', // Adds a table on Special:RecentChanges showing the last triggered anti-abuse filters. 'u:dev:MediaWiki:AddBlockUserTag/code.js', // Adds a button to the user profile masthead to block that user. /*       'u:dev:MediaWiki:YouShallNotPass/code.js',*/ // not used 'u:dev:MediaWiki:UserAccountAge/code2.js', // Appends user tag to profile masthead displaying the account's age 'u:dev:MediaWiki:DiscussionTemplates.js', // Allows users to send messages containing templates (i have no idea why this is here) 'u:dev:MediaWiki:CopyCodeButton.js', // Adds a button to syntax highlight blocks for quickly copying code. 'u:dev:MediaWiki:LakeLinks.js', // Hover popup with links for user pages. 'u:dev:MediaWiki:PortableListUsers.js', // Alternative to Special:ListUsers 'u:dev:MediaWiki:ProtectionIcons.js', // Adds icons based on the page's protection. 'u:dev:MediaWiki:AvatarLink.js', // Makes clicking your avatar go straight to your userpage. 'u:dev:MediaWiki:ClickyNavigation.js', // Forces you to click wiki navigation dropdowns to open them. 'u:dev:MediaWiki:CodeLinksDropdown.js', // Adds a dropdown link linking to personal code pages. 'u:dev:MediaWiki:DisableCode/code.js', // Allows user to disable personal and site JS/CSS for testing. 'u:dev:MediaWiki:QuickCreateUserPage/code.js', // Allows creation of user page with one click 'u:dev:MediaWiki:ToDoList.js', // To do list (requires page) 'u:dev:MediaWiki:ExternalLinkWarning.js', // warns when clicking external links 'u:dev:MediaWiki:AddArticleToCategory/code.js', // Adds an "Add Article to Category" menu. 'u:dev:MediaWiki:EditConflictAlert/code.js', // Displays a banner notification when the page you are editing gets modified. 'u:dev:MediaWiki:ProtectedHighlight/code.js', // Provides an environment ideal for reading 'u:dev:MediaWiki:ReaderMode/code.js', // Provides an environment ideal for reading 'u:dev:MediaWiki:Rollback/code.js', // Perform rollbacks without needing to be in the usergroup. 'u:dev:MediaWiki:WHAM/code.2.js', // Adds "Quick Tools" menu to user contribution page for cleanup functions. 'u:dev:MediaWiki:AnchoredRollback/code.js', // Allows you to make rollbacks without changing location. 'u:dev:MediaWiki:ListFiles/code.js', // Provides a form for querying the MediaWiki API and generating extensive lists of files and file data 'u:dev:MediaWiki:Nuke/code.js', // !! ONLY USE ON USER CONTRIBS !! Mass delete pages on recent changes or from a user's contributions akin to the extension. 'u:dev:MediaWiki:QuickLogs/code.js', // Displays user logs on Special:Contributions 'u:dev:MediaWiki:NoGlobalNav.js', // Removes global navigation and moves user dropdown and notifications when using FandomDesktop

] }); /*************** INACTIVE CODE - useless at the moment, section last edited 31/07/2022 /*WHAM* /*********************************** WHAM ************************************* window.WHAMBotMe = true; window.WHAMBotReason = "Mass reverting edits made by vandal (w:c:dev:WHAM)"; window.WHAMDeleteReason = "Deleting unneeded pages made by vandal"; window.WHAMBlockReason = "Violation of User Conduct: Vandalising (vandal)";

/*MASS CODES*/ importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:MassProtect/code.js',        'u:dev:MediaWiki:MassEdit/code.js',        'u:dev:MediaWiki:MassCategorization/code.js',        'u:dev:MediaWiki:MassUserRights/code.js',        'u:dev:MediaWiki:MassRenameRevert/code.js',        'u:dev:MediaWiki:MassPatrol/code.js',        'u:dev:MediaWiki:AjaxBatchDelete.js', // aka MassDelete        'u:dev:MediaWiki:MassRedirect/code.1.js',        'u:dev:MediaWiki:MassRename/code.js',        'u:dev:MediaWiki:MassRollback.js',       ] }); importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:AutoCreateUserPages.js',    ] }); /* Autocreateuserpages config */ window.AutoCreateUserPagesConfig = { content: { 2: ''   },    summary: 'w:dev:AutoCreateUserPages plugin for Raz Mail', notify: 'Here is a link to your userpage, Raz!' };

/*MassBlock*/ importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:FastBlock.js',    ] }); window.FastBlock = [ {       label: 'V', // Vandalism expiry: '2 weeks', reason: 'Vandalism', autoblock: 1, nocreate: 1 },

{		label: 'SV', // severe vandalism expiry: 'indefinite', reason: 'Vandalism', autoblock: 1, nocreate: 1 },	{		label: 'T', //troll account expiry: 'indefinite', reason: 'Troll account', autoblock: 1, nocreate: 1 },	{		label: 'S', // sockpuppet expiry: 'indefinite', reason: 'Sockpuppet / Alternate account of blocked user', autoblock: 1, nocreate: 1 }, /* /*	   {        label: 'LabelToBeDisplayed', expiry: 'ExpTime', reason: 'Reason', autoblock: '1 if true, 0 if false', nocreate: '1 if true, 0 if false' },
 * Example table
 * DO NOT INCLUDE '' FOR AUTOBLOCK AND NOCREATE

];

/*Code down taken from Karasuneth, on Adopt Me! Wikia licensed under CC BY 3.0. Thanks :P*/ /* Fixes userpage redlinks to no longer open the editor for that page. */ mw.hook("wikipage.content").add(function($content) {   var links = $('#mw-content-text a.new');    links.each(function(index, element){ if (!$(element).attr('href')) { var title = $(element).attr('title'); if (title.startsWith('User:') && title.endsWith('(page does not exist)')) { title = title.slice(0, -22); var decodedURL = mw.util.getUrl(title); $(element).removeAttr('data-uncrawlable-url'); $(element).attr('href', decodedURL); }       }    }); });