Weitere Optionen
CRUGG (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
CRUGG (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
||
Zeile 15: | Zeile 15: | ||
/* Additional snippet from de.tadc.wiki: */ | /* Additional snippet from de.tadc.wiki: */ | ||
/* Make character links working */ | /* Make character links working */ | ||
document.querySelectorAll(".home-characters__card").forEach(el | document.querySelectorAll(".home-characters__card").forEach(function(el) { | ||
const a = document.createElement("a"); | const a = document.createElement("a"); | ||
a.href = "/w/" + el.textContent; | a.href = "/w/" + el.textContent; | ||
Zeile 21: | Zeile 21: | ||
a.appendChild(el); | a.appendChild(el); | ||
}); | }); | ||
} ); | }); |
Aktuelle Version vom 4. Dezember 2023, 19:06 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(function(el) {
const a = document.createElement("a");
a.href = "/w/" + el.textContent;
el.parentNode.insertBefore(a, el);
a.appendChild(el);
});
});