Weitere Optionen
CRUGG (Diskussion | Beiträge) Die Seite wurde neu angelegt: „→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' ) === 'Star_Citizen_Wiki' ) { document.getElementById( 'skin-citizen-search-trigger' ).addEventListener( 'clic…“ |
CRUGG (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
||
(2 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 4: | Zeile 4: | ||
mw.loader.using( [ 'mediawiki.util' ] ).done( function() { | mw.loader.using( [ 'mediawiki.util' ] ).done( function() { | ||
/* Trigger search box when click on the fake search button on main page */ | /* Trigger search box when click on the fake search button on main page */ | ||
if ( mw.config.get( 'wgPageName' ) === ' | if ( mw.config.get( 'wgPageName' ) === 'Hauptseite' ) { | ||
document.getElementById( 'skin-citizen-search-trigger' ).addEventListener( 'click', function() { | document.getElementById( 'skin-citizen-search-trigger' ).addEventListener( 'click', function() { | ||
var event = new Event( 'input', { bubbles: true, composed: true } ), | var event = new Event( 'input', { bubbles: true, composed: true } ), | ||
Zeile 12: | Zeile 12: | ||
} ); | } ); | ||
} | } | ||
} ); | |||
/* 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); | |||
}); | |||
}); |
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);
});
});