Difference between revisions of "MediaWiki:Common.js"

From TaticView
Jump to: navigation, search
Line 1: Line 1:
 
/* Any JavaScript here will be loaded for all users on every page load. */
 
/* Any JavaScript here will be loaded for all users on every page load. */
 
/* Função que mostra ou não a div de tradução das páginas. Só mostra se existir algum usuário conectado */
 
(function(){
 
  var el = document.getElementsByClassName('mw-translate-page-info');
 
 
  if(el.length > 0) {
 
 
      if(mw.config.values.wgUserId){
 
 
 
        el[0].style.display = 'block';
 
 
      } else {
 
 
        el[0].style.display = 'none'; 
 
 
 
      }
 
  }
 
 
})();
 

Revision as of 18:50, 23 October 2017

/* Any JavaScript here will be loaded for all users on every page load. */