Zuletzt bearbeitet vor einem Jahr
von Margit Link-Rodrigue

MediaWiki:Common.js: Unterschied zwischen den Versionen

Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 7: Zeile 7:
}
}


 
/*Target based tabs*/
/*
var hashLinks = document.querySelectorAll("a[href^='#']");
$( document ).on( 'click', '.gewa-cite-backlink-btn', function( e ) {
[].forEach.call(hashLinks, function (link) {
var backlink = $( this ).parents( '.gewa-cite-backlink-cnt' ).find( '.gewa-cite-backlink' );
  link.addEventListener("click", function (event) {
if ( $( backlink ).hasClass( 'show' ) ) {
    event.preventDefault();
$( backlink ).removeClass( 'show' );
    history.pushState({}, "", link.href);
$( this ).text( 'Mehr' );
   
} else {
    // Update the URL again with the same hash, then go back
$( backlink ).addClass( 'show' );
    history.pushState({}, "", link.href);
$( this ).text( 'Weniger' );
    history.back();
}
  });
} );*/
});

Version vom 7. Februar 2023, 18:08 Uhr

/* Das folgende JavaScript wird für alle Benutzer geladen. */
if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Watchlist' ) {
   document.body.classList.add( 'mw-rcfilters-ui-initialized' );
}
if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'RecentChanges' ) {
   document.body.classList.add( 'mw-rcfilters-ui-initialized' );
}

/*Target based tabs*/
var hashLinks = document.querySelectorAll("a[href^='#']");
[].forEach.call(hashLinks, function (link) {
  link.addEventListener("click", function (event) {
    event.preventDefault();
    history.pushState({}, "", link.href);
    
    // Update the URL again with the same hash, then go back
    history.pushState({}, "", link.href);
    history.back();
  });
});
Keine Kategorien vergebenBearbeiten