Difference between revisions of "MediaWiki:Common.js"
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(){ | (function(){ | ||
var el = document.getElementsByClassName('mw-translate-page-info'); | var el = document.getElementsByClassName('mw-translate-page-info'); |
Revision as of 17:03, 23 October 2017
/* 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[0]) { if(mw.config.values.wgUserId){ el[0].style.display = 'block'; } else { el[0].style.display = 'none'; } } })();