MediaWiki:Common.js: Unterschied zwischen den Versionen

Aus Stadtsprachen
Wechseln zu:Navigation, Suche
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 34: Zeile 34:


$(document).ready(function () {
$(document).ready(function () {
  let x = $("#ca-edit a");
  let x = $("#ca-edit");
  console.log(x);
  console.log(x);
});
});

Version vom 27. September 2023, 12:47 Uhr

/* Das folgende JavaScript wird für alle Benutzer geladen. */
mw.loader.load( '/stadtsprachen/index.php?title=MediaWiki:Spotlight.js&action=raw&ctype=text/javascript' );

$( function () {
	$( '#mw-content-text' ).on( 'click', '.newwin > a', function () {
		var otherWindow = window.open();
		otherWindow.opener = null;
		otherWindow.location = this;
		return false;
	} );
} );

$( function randombg(){
    var random= Math.floor(Math.random()*3)+0;
    var bigSize=[
      "url(http://kallimachos.de/stadtsprachen/images/stadtsprachen/2/25/Vorschlag_Banner_2.jpg)",
      "url(http://kallimachos.de/stadtsprachen/images/stadtsprachen/a/a0/Vorschlag_Banner.jpg)",
      "url(http://kallimachos.de/stadtsprachen/images/stadtsprachen/8/81/Vorschlag_Banner_3.jpg)"
    ];
    var element = document.getElementById("random");
    if(typeof(element) !== 'undefined' && element !== null){
      element.style.backgroundImage=bigSize[random];
    };
});

$(document).ready(function () {
    if(mw.config.get("wgUserName") == null){    
     var hide = document.getElementById("hidden");
     var hide2 = document.getElementById("hidden2");
     hide.style.display = "none";
     hide2.style.display = "none";
    }
});

$(document).ready(function () {
 let x = $("#ca-edit");
 console.log(x);
});