Jump to content

MediaWiki:Gadget-toolbaralert2.js

From The Austrian Economics Wiki, the global repository of classical-liberal thought

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
( function( $, mw ) {
$(document).ready(function() {
	//$( '.usermessage' ).hide();
	var newMsgRevisionId = mw.config.get( 'wgUserNewMsgRevisionId' );
	if ( newMsgRevisionId && !mw.config.get( 'echoNewMsgAlertDisplayed' ) ) {
		$( '#pt-mytalk a' ).append( ':&#160;<span id="mw-echo-alert">You have new messages</span>' );
		$( '#pt-mytalk a' ).css( {
			//'border': '1px solid darkorange',
			'border-radius': '2px',
			'background-color': '#F9C557',
			'padding': '0.3em 0.9em 0.25em 0.9em',
			'color': '#555555',
			'font-weight': 'normal'
		} );
		mw.config.set( 'echoNewMsgAlertDisplayed', true );
	}
} );
} )( jQuery, mediaWiki );