User:TheGoldenPatrik1/common.js

/* Functions */ if (wgAction == 'edit' || wgAction == 'publish') { if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { 'speedTip': 'Fanon Template', 'tagOpen': '|author-username = ' };   } }

(function {   var config = mw.config.get([ 'wgNamespaceNumber', 'wgArticleId' ]);   if ( [113, 117].indexOf(config.wgNamespaceNumber) !== -1 || config.wgArticleId === 0 ) {       return;    }    $('').html('Quick Create')        .appendTo('.wds-button-group .wds-list')        .click(function { $.ajax({               type: 'POST',                url: mw.util.wikiScript('api'),                dataType: 'json',                data: {                    action: 'edit',                    title: wgPageName,                    summary: '+Talk',                    text: '',                    format: 'json',                    token: mw.user.tokens.get('editToken')                }            }).done(function(data) {                if (data.edit.result === 'Success') {                    new BannerNotification('Page successfully created!', 'confirm').show;                    window.location.reload;                } else {                    new BannerNotification('An error occurred.', 'error').show;                }            }).fail(function(data) {                new BannerNotification('An error occurred.', 'error').show;            }); });   }) ;//End Functions */

/* Import Configurations */ pageCreatorConfig = { namespaces: [112], useAvatar: false, useTimestamp: false, useUTC: false };//End IC */ /* Imports */ importArticles({   type: 'script',    articles: [        'u:dev:AjaxPatrol/code.js',        'u:dev:ListFiles/code.js',        'u:dev:PageCreator/code2.js'    ] });//End Imports */