Difference between revisions of "MediaWiki:Common.js"

From TaticView
Jump to: navigation, search
Line 16: Line 16:
 
  }
 
  }
  
}();
+
}
 +
 
 +
setPrivacyPolice();

Revision as of 13:42, 23 October 2017

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

function setPrivacyPolice() {
 var language = document.getElementsByTagName('html')[0].getAttribute('lang');
 var element = document.getElementById('footer-places-privacy').children[0];

 switch(language){
  case 'pt-BR':
   element.setAttribute('href', 'https://wiki.taticview.com/taticfiles/Privacy_policy_pt-BR.pdf');
   break;
  case 'es':
   element.setAttribute('href', 'https://wiki.taticview.com/taticfiles/Privacy_policy_es-ES.pdf');
   break;
  default:
      element.setAttribute('href', 'https://wiki.taticview.com/taticfiles/Privacy_policy_en-US.pdf');
 }

}

setPrivacyPolice();