MediaWiki:Common.js
Aus LehramtsWiki
Hinweis: Nach dem Speichern den Browser-Cache leeren, um die Änderungen zu sehen: Mozilla/Firefox: Shift-Strg-R, Internet Explorer: Strg-F5, Opera: F5, Safari: ⌘-R, Konqueror: Strg-R.
/* Jedes JavaScript hier wird für alle Benutzer für jede Seite geladen. */
// Enable cache!
$.ajaxSetup({cache:true});
//addOnloadHook( createTab );
jQuery(function ($) {
jQuery.getScript("https://fragbela.zlb-uni-due.de/assets/jquery-ui/jquery-ui.min.js");
});
// load bela injector
jQuery(function ($) {
const url = window.location.toString();
if(!url.includes('&action=edit') && !url.includes('&action=submit')) {
jQuery.getScript("https://fragbela.zlb-uni-due.de/scripts/bela-injector.js");
} else {
return;
}
});
//BeLa Live Button for chat
jQuery(function ($){
jQuery.getScript('https://lehramtswiki.uni-due.de/extensions/TweekiStyles/js/BeLaLiveButton.js');
});
jQuery(function ($){
jQuery.getScript('https://lehramtswiki.uni-due.de/extensions/TweekiStyles/js/WikiScripts.js')
});
// Tweek the Tweeki skin a little
$('.mw-redirectedfrom').remove();
if(document.URL.includes("Spezial:")){
$('#sidebar-right').remove();
$('#maincontentwrapper').removeClass('col-md-9');
}
if(document.URL.includes("Spezial:Anmelden")){
$('.mw-userlogin-help').remove();
jQuery.fn.force_center = function () {
this.css("display", "flex");
this.css("align-items", "center");
this.css("justify-content", "center");
return this;
};
$('.mw-ui-container').force_center();
}