mediawiki-extensions-Echo/modules/alert/ext.echo.alert.js
Krenair ab592dad6f Cleanup JS
* Add missing spaces after 'function'
* Remove underscores from identifiers
* Don't use typeof for undefined with local variables and object properties
* API ok/err is deprecated since MediaWiki 1.20 (< 1.22-alpha), use .done and .fail

Change-Id: I5ca3403ee263a0c3e6709618e48e896340952337
2013-06-23 01:25:29 +01:00

10 lines
417 B
JavaScript

( function ( $, mw ) {
'use strict';
if ( mw.config.get( 'wgUserNewMsgRevisionId' ) && !mw.config.get( 'echoNewMsgAlertDisplayed' ) ) {
var alertMessage = mw.html.escape( mw.msg( 'colon-separator' ) + mw.msg( 'echo-new-messages' ) );
$( '#pt-mytalk a' ).append( alertMessage );
$( '#pt-mytalk a' ).addClass( 'mw-echo-alert' );
mw.config.set( 'echoNewMsgAlertDisplayed', true );
}
} )( jQuery, mediaWiki );