MediaWiki:Common.js: Difference between revisions

    From KDE UserBase Wiki
    No edit summary
    No edit summary
     
    Line 8: Line 8:
    // Hide Translation Tool if not a translators
    // Hide Translation Tool if not a translators
    $( document ).ready( function() {
    $( document ).ready( function() {
       if ( wgUserGroups.join(' ').indexOf('translator') === -1 ) $( '#n-ub-trans-tool' ).hide();
       if ( !wgUserGroups || wgUserGroups.join(' ').indexOf('translator') === -1 ) $( '#n-ub-trans-tool' ).hide();
    });
    });

    Latest revision as of 11:10, 2 June 2011

    /* Any JavaScript here will be loaded for all users on every page load. */
    
    if (wgPageName == "Special:Search") //scripts specific to Special:Search
    {
        importScript("MediaWiki:Common.js/search.js")
    }
    
    // Hide Translation Tool if not a translators
    $( document ).ready( function() {
      if ( !wgUserGroups || wgUserGroups.join(' ').indexOf('translator') === -1 ) $( '#n-ub-trans-tool' ).hide();
    });