MediaWiki: Common.js: Unterschied zwischen den Versionen
Aus LehramtsWiki
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| (32 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
/* Jedes JavaScript hier wird für alle Benutzer für jede Seite geladen. */ | /* Jedes JavaScript hier wird für alle Benutzer für jede Seite geladen. */ | ||
// | // Enable cache! | ||
$.ajaxSetup({cache:false}); | |||
//addOnloadHook( createTab ); | //addOnloadHook( createTab ); | ||
| Zeile 12: | Zeile 7: | ||
jQuery.getScript("https://fragbela.zlb-uni-due.de/assets/jquery-ui/jquery-ui.min.js"); | jQuery.getScript("https://fragbela.zlb-uni-due.de/assets/jquery-ui/jquery-ui.min.js"); | ||
}); | }); | ||
// load bela injector | // load bela injector | ||
jQuery(function ($) { | 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; | |||
} | |||
}); | }); | ||
//jQuery(function ($) { | //BeLa Live Button for chat | ||
jQuery(function ($){ | |||
jQuery.getScript('https://lehramtswiki.uni-due.de/extensions/TweekiStyles/js/BeLaLiveButton.js'); | |||
}); | |||
jQuery(function ($){ | jQuery(function ($){ | ||
jQuery.getScript('https://lehramtswiki.uni-due.de/extensions/TweekiStyles/js/ | jQuery.getScript('https://lehramtswiki.uni-due.de/extensions/TweekiStyles/js/WikiScripts.js') | ||
}); | }); | ||
// | //Umfrage | ||
let umfrage1 = document.createElement('h4'); | |||
umfrage1.style.textAlign = "center"; | |||
let umfrage2 = document.createElement('a'); | |||
umfrage2.href = 'https://limesurvey.uni-due.de/index.php/453558?lang=de-informal'; | |||
umfrage2.target = '_blank'; | |||
umfrage2.textContent = 'Wir möchten Dich bitten, an unserer kurzen Befragung teilzunehmen und den Artikel zu bewerten. Die Ergebnisse fließen in die Weiterentwicklung ein.'; | |||
umfrage1.appendChild(umfrage2); | |||
document.querySelector("div#maincontentwrapper").prepend(umfrage1); | |||
//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 17. Oktober 2025, 11:21 Uhr
/* Jedes JavaScript hier wird für alle Benutzer für jede Seite geladen. */
// Enable cache!
$.ajaxSetup({cache:false});
//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')
});
//Umfrage
let umfrage1 = document.createElement('h4');
umfrage1.style.textAlign = "center";
let umfrage2 = document.createElement('a');
umfrage2.href = 'https://limesurvey.uni-due.de/index.php/453558?lang=de-informal';
umfrage2.target = '_blank';
umfrage2.textContent = 'Wir möchten Dich bitten, an unserer kurzen Befragung teilzunehmen und den Artikel zu bewerten. Die Ergebnisse fließen in die Weiterentwicklung ein.';
umfrage1.appendChild(umfrage2);
document.querySelector("div#maincontentwrapper").prepend(umfrage1);
//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";
}
}
});