mediawiki-extensions-Echo/modules/alert/ext.echo.alert.js
Kunal Mehta 790f4bee9e Remove "Talk:" prefix from "You have new messages"
Bug: 49324
Change-Id: I51d9fc5c891d4489fcb5bce74b0428575f1df7f6
2013-10-21 11:56:20 -07:00

13 lines
475 B
JavaScript

( function ( $, mw ) {
'use strict';
// TODO: What is this extra echoNewMsgAlertDisplayed check for? This should only run once
// and that variable isn't used anywhere else in the repository.
if ( mw.config.get( 'wgUserNewMsgRevisionId' ) && !mw.config.get( 'echoNewMsgAlertDisplayed' ) ) {
$( '#pt-mytalk a' )
.text( mw.msg( 'echo-new-messages' ) )
.addClass( 'mw-echo-alert' );
mw.config.set( 'echoNewMsgAlertDisplayed', true );
}
} )( jQuery, mediaWiki );