Weitere Optionen
CRUGG (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
CRUGG (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
||
Zeile 12: | Zeile 12: | ||
} ); | } ); | ||
} | } | ||
/* Additional snippet from de.tadc.wiki: */ | |||
/* Make character links working */ | |||
document.querySelectorAll(".home-characters__card").forEach(el => { | |||
const a = document.createElement("a"); | |||
a.href = "/w/" + el.textContent; | |||
el.parentNode.insertBefore(a, el); | |||
a.appendChild(el); | |||
}); | |||
} ); | } ); |
Version vom 4. Dezember 2023, 19:05 Uhr
/* Das folgende JavaScript wird für Benutzer des Citizen-Skins geladen */
/* Following code is from starcitizen.tools */
/* Current version of MediaWiki does not support ES6 */
mw.loader.using( [ 'mediawiki.util' ] ).done( function() {
/* Trigger search box when click on the fake search button on main page */
if ( mw.config.get( 'wgPageName' ) === 'Hauptseite' ) {
document.getElementById( 'skin-citizen-search-trigger' ).addEventListener( 'click', function() {
var event = new Event( 'input', { bubbles: true, composed: true } ),
checkbox = document.getElementById( 'citizen-search__checkbox' );
checkbox.checked = true;
checkbox.dispatchEvent( event );
} );
}
/* Additional snippet from de.tadc.wiki: */
/* Make character links working */
document.querySelectorAll(".home-characters__card").forEach(el => {
const a = document.createElement("a");
a.href = "/w/" + el.textContent;
el.parentNode.insertBefore(a, el);
a.appendChild(el);
});
} );