MediaWiki:Common.js: Unterschied zwischen den Versionen

Aus Geoportal-Landau
Zur Navigation springenZur Suche springen
Zeile 8: Zeile 8:
 
if (is_anonymus){
 
if (is_anonymus){
 
anonymus = true;
 
anonymus = true;
//document.getElementById('mw-related-navigation').style.display = "none";
+
document.getElementById('mw-related-navigation').style.display = "none";
var style = document.createElement('style');
+
/*var style = document.createElement('style');
 
style.innerHTML = `
 
style.innerHTML = `
 
#mw-related-navigation {
 
#mw-related-navigation {
Zeile 15: Zeile 15:
 
}
 
}
 
`;
 
`;
document.head.appendChild(style);
+
document.head.appendChild(style);*/
 
}else{
 
}else{
   

Version vom 13. Dezember 2019, 11:31 Uhr

/* Das folgende JavaScript wird für alle Benutzer geladen. */

function checkAnonymus() {

var anonymus = document.getElementById("p-personal").firstElementChild.innerHTML;
var is_anonymus = anonymus.match(/Anonym/g);

if (is_anonymus){
    anonymus = true;
    document.getElementById('mw-related-navigation').style.display = "none";
  /*var style = document.createElement('style');
  style.innerHTML = `
  #mw-related-navigation {
  color: blueviolet;
  }
  `;
  document.head.appendChild(style);*/
}else{

anonymus = false;
}
console.log(anonymus);
}
checkAnonymus();