User:Xilinoc/common.js

importScriptPage('RelocateEditDiscussionButtons/code.js', 'dev');

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:UCXSearchBar.js',    ] });

$(function {   mw.hook('dev.banners').add(function(BannerNotification) { mw.hook('dev.ct').add(function(addButtons) {     addButtons([ {         click: function { var api = new mw.Api; api.postWithToken('csrf', { action: 'options', optionname: 'editortype', optionvalue: 4 }) .then(function {               new BannerNotification( 'Your editor preferences have been changed successfully.' ).show              }) },         icon: 'gear', placement: 'page-tools-left', position: -1, text: 'Set source editor in your preferences' }     ]);    });  });  importArticles({ type: 'script', articles: [ 'u:dev:MediaWiki:BannerNotification.js', 'u:dev:MediaWiki:CustomTools.js' ] }); });