mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-12-13 16:38:44 +00:00
d4246e6ca6
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
13 lines
377 B
JavaScript
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 );
|
|
} );
|
|
}
|