/** * @license GNU GPL v2+ * @since 3.0 * * @author mwjames */ /*global jQuery, mediaWiki, mw */ ( function ( $, mw ) { 'use strict'; $( document ).ready( function() { $( '.smw-personal-jobqueue-watchlist' ).removeClass( 'is-disabled' ); // Iterate over available nav links onClick $( '.smw-personal-jobqueue-watchlist' ).each( function() { var watchlist = mw.config.get( 'smwgJobQueueWatchlist' ); var text = ''; for ( var prop in watchlist ) { if ( watchlist.hasOwnProperty( prop ) ) { text = text + '
  • '+ '[ ' + watchlist[prop] + ' ] ' + prop +'
  • '; } } if ( text !== '' ) { if ( document.documentElement.dir === "rtl" ) { var line = '
    '; } else{ var line = '
    '; } text = '

    ' + mw.msg( 'smw-personal-jobqueue-watchlist-explain' ) + '

    ' + line + ''; var tooltip = smw.Factory.newTooltip(); tooltip.show ( { context: $( this ), title: mw.msg( 'smw-personal-jobqueue-watchlist' ), type: 'inline', content: text, maxWidth: 280 } ); }; } ); } ); }( jQuery, mediaWiki ) );