User:Richterbelmont10/global.js

'use strict'; $( function {        // w:Thread:570938        if ( ( mw.config.get( 'wgAction' ) === 'edit' || mw.config.get( 'wgAction' ) === 'submit' ) && mw.config.get( 'skin' ) === 'monobook' ) {            var content = $( '#wpTextbox1' ).val,                 previewClick = false;            $( '#wpSave, #wpPreview, #wpDiff' ).click( function  { previewClick = true; } );           $( window ).bind( 'beforeunload', function  { if ( previewClick ) { return; }               if ( $( '#wpTextbox1' ).val !== content ) { return ' '; }           } );        }    } ); }( this, this.jQuery, this.mediaWiki ) );
 * ( function ( window, $, mw ) {