FANDOM


FastCreate adds fully customizable buttons to the bottom Toolbar in order to quickly create pages.

Installation

Customization

There are eight configuration options for each button.

Name Description Default Type
label The button's text. N/A Required
target The page that is to be created. N/A Required
summary The edit summary. N/A Required
content The page's content. N/A Required
alwaysDisplay Makes the button display even if the page already exists. false Optional
prepend Prepends the button. false Optional
placement Changes where the button is added. Toolbar Optional
require Adds another condition that must be true for the button to show up. N/A Optional

In order for this script to work, the first four parameters must be supplied for each button. The others are completely optional. Below is an example configuration.

window.FCButtons = [
     {
        label: 'Create userpage',
        target: 'User:TheGoldenPatrik1',
        summary: 'Creating',
        content: '{{w:User:TheGoldenPatrik1}}',
        alwaysDisplay: true,
        placement: '.wds-global-navigation__user-menu .wds-list'
    },
    {
        label: 'Sandbox',
        target: 'User:TheGoldenPatrik1/Sandbox',
        summary: 'Creating via [[w:c:dev:FastCreate|Script]]',
        content: 'This is my Sandbox.',
        prepend: true,
        require: mw.config.get('wgPageName') === 'User:TheGoldenPatrik1'
    }
];
Text above can be found here (edit)


Community content is available under CC-BY-SA unless otherwise noted.

Fandom may earn an affiliate commission on sales made from links on this page.

Stream the best stories.

Fandom may earn an affiliate commission on sales made from links on this page.

Get Disney+