User:Cqm/monobook.js

/** * */

this.cqm = this.cqm || {}; this.cqm.monobook = this.cqm.monobook || {};

'use strict';
 * ( function ( window, $, mw, cqm ) {

cqm.monobook = { init: function { cqm.monobook.saveChanges; },       saveChanges: function  {

if ( ( mw.config.get( 'wgAction' ) === 'edit' || mw.config.get( 'wgAction' ) === 'submit' ) && mw.config.get( 'skin' ) === 'monobook' ) { var content = $( '#wpTextbox1' ).val, previewClick = false; $( '#wpPreview, #wpClick' ).click( function {                    previewClick = true;

} );               $( window ).bind( 'beforeunload', function  {

if ( previewClick ) { return; }

if ( $( '#wpTextbox1' ).val !== content ) { return ' '; }               } );            }

}   };

$( cqm.monobook.init );

}( this, this.jQuery, this.mediaWiki, this.cqm ) );

/* */