mediawiki-skins-Vector/resources/skins.vector.typographySurvey/index.js
Jan Drewniak d4246e6ca6 Web typography prototype survey
Creates an interactive prototype for gathering
feedback on users typography preferences.
This prototype is meant to be temporary and is
built soley for feedback purposes for the
WMF Accessibility for reading project.

The prototype code is:
- for logged-in users only
- hidden under the API user preference "vector-typography-survey"
- disabled by default

It is intended to be enabled via a banner that calls
code similar to:
    new mw.Api().saveOption( 'vector-typography-survey', 1 )

Bug: T347208
Change-Id: I8d8914a0fa16d40cb22ed0e61832bc5bbabe1c78
2023-10-02 10:56:40 -07:00

13 lines
377 B
JavaScript

if ( mw.config.get( 'wgNamespaceNumber' ) === 0 ) {
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 );
} );
}