w/skins/MinervaNeue/resources/skins.minerva.editor/init.js
/**
	 * Setup the editor if the user can edit the page otherwise show a sorry toast.
	 * @method
	 * @ignore
	 */
Setup the editor if the user can edit the page otherwise show a sorry toast.
@method
@ignore
Setup the editor if the user can edit the page otherwise show a sorry toast . @method @ignore
function init() {
		if ( isEditable ) {
			setupEditor( currentPage );
		} else {
			updateEditPageButton( false );
			if ( blockInfo ) {
				$( '#ca-edit' ).on( 'click', function ( ev ) {
					popup.show(
						mw.msg(
							'mobile-frontend-editor-blocked-info-loggedin',
							$( '<div />' ).html( blockInfo.blockReason ).text(),
							blockInfo.blockedBy
						),
						{
							autoHide: false
						}
					);
					ev.preventDefault();
				} );
				$( '.edit-page' ).detach();
			} else {
				showSorryToast( mw.msg( 'mobile-frontend-editor-disabled' ) );
			}
		}
	}
function init ( ) { if ( isEditable ) { setupEditor ( currentPage ) ; } else { updateEditPageButton ( false ) ; if ( blockInfo ) { $ ( '#ca-edit' ) . on ( 'click' , function ( ev ) { popup . show ( mw . msg ( 'mobile-frontend-editor-blocked-info-loggedin' , $ ( '<div />' ) . html ( blockInfo . blockReason ) . text ( ) , blockInfo . blockedBy ) , { autoHide : false } ) ; ev . preventDefault ( ) ; } ) ; $ ( '.edit-page' ) . detach ( ) ; } else { showSorryToast ( mw . msg ( 'mobile-frontend-editor-disabled' ) ) ; } } }
Setup the editor if the user can edit the page otherwise show a sorry toast.
Setup the editor if the user can edit the page otherwise show a sorry toast .
// Edit button updated in setupEditor. // Strip any html in the blockReason.