mediawiki-skins-Vector/resources/skins.vector.typographySurvey/index.js
Jan Drewniak dcdcecd3db Add config option to disable Readability survery & minor fixes
Adds a config option to control the Readability prototype
survey tool on a per-wiki basis.

Minor fixes:
- Adds missing i18n messages to the tool for slider labels
- Ensures tool only runs on Vector 2022 skin
- Wraps the initialization in an IIFE

Change-Id: Ia65a0043dab5e9a23d4ef401ed83914e4f3d2882
2023-10-16 00:45:59 +00:00

17 lines
454 B
JavaScript

( function () {
const isMainNamespace = mw.config.get( 'wgNamespaceNumber' ) === 0;
if ( isMainNamespace ) {
mw.loader.using( [ 'vue' ] ).then( function () {
const Vue = require( 'vue' ),
App = require( './TypographySurvey.vue' ),
mountEl = document.createElement( 'div' );
mountEl.id = 'vector-typography-survey';
document.body.appendChild( mountEl );
// @ts-ignore
Vue.createMwApp( App ).mount( mountEl );
} );
}
}() );