Difference between revisions of "MediaWiki:Common.js"

From TaticView
Jump to: navigation, search
(Replaced content with "Any JavaScript here will be loaded for all users on every page load.: ")
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. */
 +
 +
function disableDivTranslation() {
 +
 +
  var el = document.getElementById('mw-content-text');
 +
 +
  if(mw.config.values.wgUserId === null || mw.config.values.wgUserId === 'undefined'){
 +
     
 +
      el.children[0].style.display = 'none';
 +
     
 +
  } else {
 +
 +
      el.children[0].style.display = 'block'; 
 +
 +
  }
 +
 +
}
 +
 +
disableDivTranslation();

Revision as of 16:15, 23 October 2017

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

function disableDivTranslation() {

   var el = document.getElementById('mw-content-text');

   if(mw.config.values.wgUserId === null || mw.config.values.wgUserId === 'undefined'){
      
      el.children[0].style.display = 'none';
      
   } else {

      el.children[0].style.display = 'block';   

   }

}

disableDivTranslation();