3 const outer = document.querySelector( '.mw-htmlform' );
5 outer.classList.add( 'mw-block-form' );
6 const Vue = require( 'vue' );
7 const App = require( './SpecialBlock.vue' );
8 const { createPinia } = require( 'pinia' );
10 // Load any extension-provided messages added by the PHP GetAllBlockActions hook.
11 ( new mw.Api() ).loadMessagesIfMissing(
12 Object.keys( mw.config.get( 'partialBlockActionOptions' ) || {} )
14 Vue.createMwApp( App )
17 // We keep the wrapping form but never want it to submit.
18 outer.addEventListener( 'submit', ( e ) => e.preventDefault() );