Skip to content

use more compact initialization code #271

@NovemLinguae

Description

@NovemLinguae

Currently, all my user scripts use something like...

$( async () => {
	await mw.loader.using( [ 'mediawiki.api' ], async () => {
		await ( new Links( mw ) ).execute();
	} );
} );

SD0001's standard way of doing it is more compact. Maybe refactor to this:

$.when( $.ready, mw.loader.using( [ 'mediawiki.api' ] ) ).then(
	( new Links( mw ) ).execute();
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions