|
|
(286 dazwischenliegende Versionen von 4 Benutzern werden nicht angezeigt) |
Zeile 1: |
Zeile 1: |
| /* Das folgende JavaScript wird für alle Benutzer geladen. */
| | mw.loader.load('/index.php?title=MediaWiki:ListNav.js&action=raw&ctype=text/javascript'); |
| $(document).ready(function() {
| | mw.loader.load('/index.php?title=MediaWiki:Editor.js&action=raw&ctype=text/javascript'); |
| if(mw.config.get('wgCanonicalNamespace') === 'Talk' && mw.config.get('wgIsArticle') === true && mw.config.get('skin') === 'tweeki' && mw.config.get('wgUserName') !== 'null'){
| | mw.loader.load('/index.php?title=MediaWiki:CustomDrilldown.js&action=raw&ctype=text/javascript'); |
| document.body.innerHTML += '<html><a href="/camerarius/index.php?title=' + wgPageName + '&action=edit"><div id="sidebutton"><button class="feedback">Bearbeiten</div></div></a></html>';
| | mw.loader.load('/index.php?title=MediaWiki:CustomCommentStream.js&action=raw&ctype=text/javascript'); |
| }
| | mw.loader.load('/index.php?title=MediaWiki:ScrollTop.js&action=raw&ctype=text/javascript'); |
| });
| | mw.loader.load('/index.php?title=MediaWiki:Feedback.js&action=raw&ctype=text/javascript'); |
| $(document).ready(function() {
| | mw.loader.load('/index.php?title=MediaWiki:Werkbeschreibung.js&action=raw&ctype=text/javascript'); |
| if(mw.config.get('wgCanonicalNamespace') !== 'Talk' && mw.config.get('wgIsArticle') === true && mw.config.get('skin') === 'tweeki' && mw.config.get('wgPageName') !== "Einführung" && mw.config.get('wgCanonicalNamespace') !== "Category"){
| | mw.loader.load('/index.php?title=MediaWiki:Custom.js&action=raw&ctype=text/javascript'); |
| document.body.innerHTML += '<html><a href="/camerarius/index.php/Talk:' + wgPageName + '"><div id="sidebutton"><button class="feedback">Feedback</div></div></a></html>';
| | mw.loader.load('/index.php?title=MediaWiki:Navbar.js&action=raw&ctype=text/javascript'); |
| }
| |
| });
| |
| if ( $( "#discussion" ).length ) {
| |
| $.getJSON("http://kallimachos.de/camerarius/api.php?action=query&list=recentchanges&rcnamespace=1&rcprop=title%7Ctimestamp%7Cuser&rclimit=500&format=json", function( json ) {
| |
| json.query.recentchanges.forEach(function (arrayItem) {
| |
| $('#discussion').append('<tr><td><a href="/camerarius/index.php/' + arrayItem.title + '">' + arrayItem.title.replace("Diskussion:", "") + '</a></td><td>' + arrayItem.user + '</td><td>' + arrayItem.timestamp.replace(/T|Z/g,' ') + '</td></tr>');
| |
| });
| |
| });
| |
| }
| |
| $(document).ready(function() {
| |
| $(".nav li.disabled a").click(function() {
| |
| return false;
| |
| });
| |
| });
| |
| | |
| function loadFrame(url){
| |
| $( "#result" ).empty().load(url + ' #frameContent,#frameContentInner');
| |
| $( "#linkResult" ).empty().prepend('<div class="container"><div class="col-md-4"></div><div class="col-md-4"> <a href=' + url + ' class="btn btn-sm drilldown-btn-test victoria-two">Seite besuchen</a></div><div class="col-md-4"></div></div>');
| |
| }
| |
| | |
| function onReady(callback) {
| |
| var intervalID = window.setInterval(checkReady, 1000);
| |
|
| |
|
| function checkReady() {
| | function waitForElement(e, n) { |
| if (document.getElementsByTagName('body')[0] !== undefined) {
| | window.setTimeout(function () { |
| window.clearInterval(intervalID);
| | $(e).length ? n(e, $(e)) : waitForElement(e, n) |
| callback.call(this);
| | }, 500) |
| }
| |
| }
| |
| } | | } |
|
| |
|
| function show(id, value) { | | function toggleTimeline() { |
| document.getElementById(id).style.display = value ? 'block' : 'none';
| | $("html, body").animate({ |
| | scrollTop: $("#timelineWrapper").offset().top |
| | }, 500, "linear") |
| } | | } |
|
| |
|
| onReady(function () {
| | /** Add custom text to MediaWiki search page **/ |
| show('page', true);
| | if("Search" === mw.config.get("wgCanonicalSpecialPageName")){ |
| show('loading', false);
| | $('<div class="card card-body bg-light"><p>Durch eine Trunkierung des Suchbegriffs mit * lassen sich ggf. mehr Treffer erzielen ("Eoban*" findet "Eoban, Eobanus, Eobani" usw.). <br/>Weitere Recherchemöglichkeiten erläutert die <a target="_blank" href="http://camerarius.kallimachos.de/Anleitung#strategy-v">Einführung.</a></p></div>').insertBefore("#bodyContent"); |
| });
| |
| | |
| | |
| /**** Custom collapse ***/ | |
| $(function() {
| |
| $(".collapsibleDesc").on('click', function() {
| |
| $(this).next(".collapsedDesc").toggle();
| |
| });
| |
| })
| |
| $(document).ready(function() {
| |
| $(".collapsibleDesc").click(function() { | |
| $(this).fadeToggle(200, function() {
| |
| $(this).html(($(this).html() == '(Kurzbeschreibung ausblenden <i class="fa fa-minus" aria-hidden="true"></i>)') ? '(Kurzbeschreibung einblenden <i class="fa fa-plus" aria-hidden="true"></i>)' : '(Kurzbeschreibung ausblenden <i class="fa fa-minus" aria-hidden="true"></i>)').fadeToggle(200);
| |
| })
| |
| })
| |
| });
| |
| | |
| function drilldownswitcher() {
| |
| if ($('#drilldown-switch:contains("Alle Filter ausklappen")').length){
| |
| $('.drilldown-filter-values:has(a)').css('display', 'block');
| |
| $('.drilldown-values-toggle').each(function () {
| |
| $('img').each(function () {
| |
| $(this).attr('src', $(this).attr('src').replace('right-arrow.png', 'down-arrow.png'));
| |
| });
| |
| });
| |
| document.getElementById("drilldown-switch").innerHTML='Alle Filter einklappen <i class="fa fa-minus"></i>';
| |
| }
| |
| else if ($('#drilldown-switch:contains("Alle Filter einklappen")').length){
| |
| $('.drilldown-filter-values:has(a)').css('display', 'none');
| |
| $('.drilldown-values-toggle').each(function () {
| |
| $('img').each(function () {
| |
| $(this).attr('src', $(this).attr('src').replace('down-arrow.png', 'right-arrow.png'));
| |
| });
| |
| });
| |
| document.getElementById("drilldown-switch").innerHTML='Alle Filter ausklappen <i class="fa fa-plus"></i>';
| |
| }
| |
| } | | } |
|
| |
| $(document).ready(function() {
| |
| $('#drilldown-header').next().remove();
| |
| $('<br /><h3 class="drilldown-pre-header">1. Gesetzte Filter</h3>').insertBefore("#drilldown-header");
| |
| $('<p class="drilldown-post-header">Diese Seite besteht aus einer Reihe von Filteroptionen und einer im Anschluss ausgegebenen Liste von Treffern.<br />Wählen Sie einen oder mehrere Filter, um die Listenanzeige gezielt einzuschränken. Klicken Sie hierzu auf den Pfeil vor dem Filter und treffen Sie dann Ihre Auswahl.</p>').insertAfter("#drilldown-header");
| |
| $('<h3 class="drilldown-pre-filters">2. Verfügbare Filteroptionen</h3>').insertBefore('.drilldown-filters');
| |
| $('<h3 class="drilldown-post-filters">3. Anwendung der Filter</h3>').insertAfter('.drilldown-filters');
| |
| $("div.drilldown-results").parent().parent().prepend('<htmL><div class="button-wrapper"><a class="btn btn-sm drilldown-btn-test thar-three" href="javascript:;" onclick="drilldownswitcher()" id="drilldown-switch">Alle Filter ausklappen <i class="fa fa-plus"></i></a></div></html>');
| |
| });
| |
|
| |
| /* Hide empty drilldown elements */
| |
| $(function() {
| |
| $("div .drilldown-filter-values:contains('(Es sind keine Werte für diesen Filter vorhanden.)')").parent('div').remove();
| |
| });
| |
|
| |
| /* Unblur when drilldown has loaded */
| |
| $(window).load(function() {
| |
| $(".drilldown-results").css({"-webkit-filter": "blur(0)", "-moz-filter": "blur(0)", "-o-filter": "blur(0)", "-ms-filter": "blur(0)", "filter": "blur(0)"});
| |
| });
| |
|
| |
| /* Scroll up */
| |
|
| |
| $( "body" ).append('<a onclick="scrollup()" id="return-to-top"><i class="fa fa-chevron-up"></i></a>');
| |
|
| |
| $(window).scroll(function() {
| |
| if ($(this).scrollTop() >= 50) {
| |
| $('#return-to-top').fadeIn(200);
| |
| } else {
| |
| $('#return-to-top').fadeOut(200);
| |
| }
| |
| });
| |
| function scrollup() {
| |
| $('body,html').animate({
| |
| scrollTop : 0
| |
| }, 500);
| |
| };
| |
|
| |
| $(document).ready(function () {
| |
| $('.drilldown-filter-values:has(a)').css('display', 'none');
| |
| });
| |
|
| |
| $(document).ready(function () {
| |
| $('.drilldown-values-toggle').each(function () {
| |
| $('img').each(function () {
| |
| $(this).attr('src', $(this).attr('src').replace('down-arrow.png', 'right-arrow.png'));
| |
| })
| |
| })
| |
| });
| |
|
| |
| console.log(mw.config.get('wgCanonicalNamespace'))
| |