MediaWiki:Common.js: Unterschied zwischen den Versionen
Aus Stadtsprachen
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
Zeile 35: | Zeile 35: | ||
$(document).ready(function () { | $(document).ready(function () { | ||
let edit-btn = document.getElementById("ca-edit").firstChild; | let edit-btn = document.getElementById("ca-edit").firstChild; | ||
console.log("1") | |||
edit-btn.setAttribute("href") = edit-btn.getAttribute("href").split("action=")[0] + "action=formedit"; | edit-btn.setAttribute("href") = edit-btn.getAttribute("href").split("action=")[0] + "action=formedit"; | ||
}); | }); |
Version vom 27. September 2023, 12:42 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 edit-btn = document.getElementById("ca-edit").firstChild;
console.log("1")
edit-btn.setAttribute("href") = edit-btn.getAttribute("href").split("action=")[0] + "action=formedit";
});