mediawiki-extensions-Echo/modules/alert/ext.echo.alert.js
bsitu b9e5b2f64a (bug 51640) wgUserNewMsgRevisionId is null with only one rev
wgUserNewMsgRevisionId is null with only one revision and that revision is
not viewed, this makes it not reliable for determining if there is new
message.  We just switch to check against $user->getNewtalk() instead.

We can still use wgUserNewMsgRevisionId to generate diff links if desired

Change-Id: I4cf50a944aada03151bd17f3610bd59b3bfb2bf2
2013-07-19 11:50:43 -07:00

10 lines
372 B
JavaScript

( function ( $, mw ) {
'use strict';
if ( !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 );