User:Wildream-fduser/global.js

//Notifiactions importScriptPage('User:Wildream/SoundNotifications.js', 'ru.community');

//ForcePreview //importScriptURI('https://internal.wikia-inc.com/index.php?title=MediaWiki:ForcePreview.js&action=raw&ctype=text/javascript');

//Chathacks importScriptPage('User:Monchoman45/ChatHacks.js', 'c');

//WHAM importScriptPage('User:Joeyaa/wham.js','vstf');

//BatchDelete importScriptPage('AjaxBatchDelete/code.js', 'dev');

//WallGreetingButton importArticles({   type: 'script',    articles: [        'w:dev:WallGreetingButton/code.js'    ] });

//CSS Pad importArticles({   type: 'script',    articles: [        'w:dev:PortableCSSPad/code.js'    ] });

//An easy way to quote someone in Special:Chat importScriptPage('User:Wildream/ChatQuote/code.js', 'ru.community');

$(function {   $('a[data-id=createuserpage]').parent.remove;    $('Create user page').insertAfter('#AccountNavigation .subnav li:eq(1)');

$("a[data-id='createprofile']").click(function {       var userpageContent = ;        if (mw.config.get('wgContentLanguage') === 'ru') {            userpageContent = ;        } else if (mw.config.get('wgContentLanguage') === 'uk') {            userpageContent = ;        } else {            userpageContent = ;        }

$.ajax({           url: mw.util.wikiScript('api'),            data: {                format: 'json',                action: 'edit',                title: 'User:Wildream',                text: userpageContent,                summary: 'Creating user profile',                token: mw.user.tokens.get('editToken')            },            dataType: 'json',            type: 'POST',            success: function(data) {                if (data && data.edit && data.edit.result == 'Success') {                    $(' \ Successfully created user page. \             ')                        .insertAfter('#WikiaHeader')                        .slideToggle(500)                        .delay(5000)                        .slideToggle(500);                } else {                    $(' \ An error occurred while creating user page. \             ')                        .insertAfter('#WikiaHeader')                        .slideToggle(500)                        .delay(5000)                        .slideToggle(500);                }            },            error: function(xhr) {                $(' \ An error occurred while creating user page. \             ')                    .insertAfter('#WikiaHeader')                    .slideToggle(500)                    .delay(5000)                    .slideToggle(500);            }        });

}); });