mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-15 11:58:44 +00:00
dcdcecd3db
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
17 lines
454 B
JavaScript
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 );
|
|
} );
|
|
}
|
|
}() );
|