2013-06-18 15:23:35 +00:00
|
|
|
( function ( $, mw ) {
|
2013-05-14 07:05:09 +00:00
|
|
|
'use strict';
|
2013-09-24 00:10:58 +00:00
|
|
|
// TODO: What is this extra echoNewMsgAlertDisplayed check for? This should only run once
|
|
|
|
// and that variable isn't used anywhere else in the repository.
|
2013-07-30 20:45:03 +00:00
|
|
|
if ( mw.config.get( 'wgUserNewMsgRevisionId' ) && !mw.config.get( 'echoNewMsgAlertDisplayed' ) ) {
|
2013-05-14 07:05:09 +00:00
|
|
|
var alertMessage = mw.html.escape( mw.msg( 'colon-separator' ) + mw.msg( 'echo-new-messages' ) );
|
2013-09-24 00:10:58 +00:00
|
|
|
|
|
|
|
$( '#pt-mytalk a' )
|
|
|
|
.append( alertMessage )
|
|
|
|
.addClass( 'mw-echo-alert' );
|
|
|
|
|
2013-05-14 07:05:09 +00:00
|
|
|
mw.config.set( 'echoNewMsgAlertDisplayed', true );
|
|
|
|
}
|
|
|
|
} )( jQuery, mediaWiki );
|