MediaWiki:Common.js

// 06:51, 26 November 2020 (UTC)

// AUTO-REFRESH RECENT CHANGES AND WIKI-ACTIVITY window.AjaxRCRefreshText = 'Auto-refresh'; window.AjaxRCRefreshHoverText = 'Automatically refresh the page'; window.ajaxPages = ["Special:RecentChanges"]; // END AUTO-REFRESH

// Create the "dev" namespace if it doesn't exist already: window.dev = window.dev || {}; // Create the sub-namespace for this addon and set some options: window.dev.editSummaries = { select: 'Template:Stdsummaries' };

window.UserTagsJS = { modules: {}, tags: { assistant: 'Assistant', threadmoderator: 'Discussion Moderator', 'content-moderator': 'Content Moderator' } };

UserTagsJS.modules.inactive = 62; UserTagsJS.modules.newuser = true; UserTagsJS.modules.autoconfirmed = true; UserTagsJS.modules.mwGroups = [ 'bureaucrat', 'sysop', 'assistant', 'rollback', 'threadmoderator', 'content-moderator', 'global-discussions-moderator' ];

/* Custom edit buttons See https://community.fandom.com/wiki/Help:Custom_edit_buttons */ if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "https://vignette.wikia.nocookie.net/csydes-test/images/0/0a/Gallery_add.png", "speedTip": "", "tagOpen": "<" + "gallery>", "tagClose": " ", "sampleText": "", "imageId": "mw-editbutton-wpg" };

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "https://vignette.wikia.nocookie.net/csydes-test/images/1/11/Btn_toolbar_liste.png", "speedTip": "List", "tagOpen": "\n* ", "tagClose": "\n* Element B\n* Element C", "sampleText": "Element A"   };

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "https://vignette.wikia.nocookie.net/csydes-test/images/8/88/Btn_toolbar_enum.png", "speedTip": "Numbering", "tagOpen": "\n# ", "tagClose": "\n# Element 2\n# Element 3", "sampleText": "Element 1" };

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "https://vignette.wikia.nocookie.net/csydes-test/images/f/fd/Button_blockquote.png", "speedTip": "Blockquote", "tagOpen": " ", "tagClose": " ", "sampleText": "Insert text" };

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "https://vignette.wikia.nocookie.net/csydes-test/images/7/74/Button_comment.png", "speedTip": "Note", "tagOpen": "", "sampleText": "Insert text" };

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "https://vignette.wikia.nocookie.net/csydes-test/images/b/b4/Button_category03.png", "speedTip": "Category", "tagOpen": "[[Category:",       "tagClose": "]]", "sampleText": "Category name" };

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "https://vignette.wikia.nocookie.net/csydes-test/images/c/c8/Button_redirect.png", "speedTip": "Redirect", "tagOpen": "#REDIRECT ",       "tagClose": "", "sampleText": "Insert text" };

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "https://vignette.wikia.nocookie.net/csydes-test/images/1/12/Button_gallery.png", "speedTip": "Picture gallery", "tagOpen": "\n\nImage:", "tagClose": "|C.Syde's Wiki Logo\nImage:Wiki.png|C.Syde's Wiki Logo\nImage:Wiki.png|Eine C.Syde's Wiki Logo\n<\/gallery>", "sampleText": "Wiki.png" };

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "https://vignette.wikia.nocookie.net/csydes-test/images/3/3b/Button_template_alt.png", "speedTip": "Template", "tagOpen": "", "sampleText": "Template" };

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "https://vignette.wikia.nocookie.net/csydes-test/images/c/c9/Button_strike.png", "speedTip": "Strike", "tagOpen": " ", "tagClose": " ", "sampleText": "Strike-through text" };

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "https://vignette.wikia.nocookie.net/csydes-test/images/1/13/Button_enter.png", "speedTip": "Line break", "tagOpen": " ", "tagClose": "", "sampleText": "" };

mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "https://vignette.wikia.nocookie.net/csydes-test/images/7/74/Button_comment.png", "speedTip": "Comment visible only for editors", "tagOpen": "", "sampleText": "Insert comment here" }; }

$(function {   if ($.getUrlVar('action') !== 'edit') {        return;    }    var interval = setInterval(function { var $button = $('#mw-editbutton-wpg'); if ($button.exists) { clearInterval(interval); $button.off.click(function {               WikiaPhotoGallery.showEditor({ from: 'source' });           });        }    }, 100); });

if (['assistant','bot','content-moderator','sysop'].indexOf(mw.config.get('wgUserGroups')) >= 0) { massRenameDelay = 1000; massRenameSummary = 'automatic'; importScriptPage('MediaWiki:MassRename/code.js', 'dev');

massProtectDelay = 500; massProtectSummary = 'automatic'; importScriptPage('MediaWiki:MassProtect/code.js', 'dev'); }

importArticle({   type: 'style',    article: 'MediaWiki:Import.css' });

(window.dev = window.dev || {}).profileTags = { noHideTags: true };

// Initialise the global objects used without overwriting any already there window.dev = window.dev || {}; window.dev.i18n = window.dev.i18n || {}; window.dev.i18n.overrides = window.dev.i18n.overrides || {}; window.dev.i18n.overrides['AdminDashboard JS-Button'] = window.dev.i18n.overrides['AdminDashboard JS-Button'] || {}

// Customise the desired messages window.dev.i18n.overrides['AdminDashboard JS-Button']['tooltip'] = 'Customise your wiki with local JavaScript.';

// Prevent users without rollback rights from using the rollback script window.RollbackWikiDisable = true;

// Create an "Add a Blog Post" link to the Project:Administrators' dashboard page var $elem = $('.create-blog'), $html = $elem.html;

$elem.html( $('', { href: mw.util.getUrl('User_blog:' + mw.config.get('wgUserName'), { createNewPost: 1 }), html: $html || "Create blog listing", title: "Create a new blog post", }) );