MediaWiki: Common.js: Unterschied zwischen den Versionen

Aus LehramtsWiki
Wechseln zu: Navigation, Suche
Keine Bearbeitungszusammenfassung
Markierung: Zurückgesetzt
Keine Bearbeitungszusammenfassung
 
(9 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 29: Zeile 29:
});
});


// Tweek the Tweeki skin a little
//Subnav
$('.mw-redirectedfrom').remove();
const subnav = document.createElement('div');
subnav.id="sub-nav-created-via-js-dom";
subnav.className = 'd-flex justify-content-center align-items-center';
subnav.style = "background-color: #46719f;";
const subnav1 = document.createElement('a');
subnav1.id="sub-nav-text";
subnav1.innerText="Hilf uns, das Wiki zu verbessern, und nimm an unserer kurzen Umfrage teil.";
subnav1.href="https://limesurvey.uni-due.de/index.php/453558?lang=de-informal";
subnav1.target='_blank';
subnav1.className="my-auto py-2 px-2 h5";
subnav1.style="color: #ffffffcc;";
subnav.appendChild(subnav1);
document.querySelector("nav").after(subnav);


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();
//Redirect user if not logged in from Vorlage to index
$(function() {
if (document.title.startsWith("Vorlage:")){
  if (mw.user.isAnon == null) {
    window.location.href = "/index.php";
  }
}
}
});

Aktuelle Version vom 5. Januar 2026, 11:07 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')
});

//Subnav
const subnav = document.createElement('div');
subnav.id="sub-nav-created-via-js-dom";
subnav.className = 'd-flex justify-content-center align-items-center';
subnav.style = "background-color: #46719f;";
const subnav1 = document.createElement('a');
subnav1.id="sub-nav-text";
subnav1.innerText="Hilf uns, das Wiki zu verbessern, und nimm an unserer kurzen Umfrage teil.";
subnav1.href="https://limesurvey.uni-due.de/index.php/453558?lang=de-informal";
subnav1.target='_blank';
subnav1.className="my-auto py-2 px-2 h5";
subnav1.style="color: #ffffffcc;";
subnav.appendChild(subnav1);
document.querySelector("nav").after(subnav);


//Redirect user if not logged in from Vorlage to index
$(function() {
if (document.title.startsWith("Vorlage:")){
  if (mw.user.isAnon == null) {
    window.location.href = "/index.php";
  }
}
});