mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-15 03:35:01 +00:00
b9e5b2f64a
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
10 lines
372 B
JavaScript
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 );
|