MediaWiki: Common.js: Unterschied zwischen den Versionen
Aus LehramtsWiki
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung Markierung: Zurückgesetzt |
||
Zeile 28: | Zeile 28: | ||
jQuery.getScript('https://lehramtswiki.uni-due.de/extensions/TweekiStyles/js/WikiScripts.js') | 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(); | |||
} |
Version vom 19. Mai 2025, 10:26 Uhr
/* 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(); }