MediaWiki:Wikia.js

//UserPage Create $(function {   $('').html('Create Profile')        .prependTo('.toolbar .tools')        .click(function { $.showCustomModal('Profile Information', ' Infobox Background Color  Title  Image  Voiced By  Species  Gender  Nicknames  Friends  Occupation  Affiliation  Residence  First Appearance  Other Appearances  ', {               id: 'cpModal',                buttons: [{                    id: 'createProfile',                    defaultButton: true, message: 'Create', handler: function { var ifbbgcolor = $('#ifbbgcolor').val; var ifbtitle = $('#ifbtitle').val; var ifbimage = $('#ifbimage').val; var ifbvoiceb = $('#ifbvoiceb').val; var ifbspecies = $('#ifbspecies').val; var ifbgender = $('#ifbgender').val; var ifbnickn = $('#ifbnickn').val; var ifbfriend = $('#ifbfriend').val; var ifboccu = $('#ifboccu').val; var ifbaffil = $('#ifbaffil').val; var ifbres = $('ifbres').val; var ifbfapp = $('ifbfapp').val; var ifboapp = $('#ifboapp').val; new mw.Api.post({                           action: 'edit',                            title: 'User:' + wgUserName,                            summary: 'Creating Profile',                            text: '',                            format: 'json',                            createonly: true,                            token: mw.user.tokens.get('editToken')                        }).done(function(data) {                            if (data.edit.result === 'Success') {                                new BannerNotification("Successfully created page!", "confirm").show;                            } else {                                new BannerNotification("An error occurred.", "error").show;                            }                        }).fail(function(data) {                            new BannerNotification("An error occurred.", "error").show; });                   }                }, {                    id: 'cpCancel',                    defaultButton: true,                    message: 'Cancel',                    handler: function {                        $('#cpModal').closeModal;                    }                }]            }); }); });