MediaWiki:Common.js: Unterschied zwischen den Versionen
Aus Shoplytics Wiki
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 3: | Zeile 3: | ||
if (mw.config.get('wgPageName') === 'Hauptseite') { | if (mw.config.get('wgPageName') === 'Hauptseite') { | ||
const searchForm = ` | const searchForm = ` | ||
<h1 style="color:#220e60; font-weight:700; text-align:center; border:0;">Wie können wir dir helfen?</h1 | <h1 style="color:#220e60; font-weight:700; text-align:center; border:0;">Wie können wir dir helfen?</h1><br> | ||
<style>.firstHeading {display:none;}</style> | <style>.firstHeading {display:none;}</style> | ||
<form style="text-align: center;" action="/index.php" method="get" class="custom-search-form" style="margin-top: 1em;"> | <form style="text-align: center;" action="/index.php" method="get" class="custom-search-form" style="margin-top: 1em;"> | ||
Version vom 21. April 2025, 10:35 Uhr
/* Das folgende JavaScript wird für alle Benutzer geladen. */
$(document).ready(function() {
if (mw.config.get('wgPageName') === 'Hauptseite') {
const searchForm = `
<h1 style="color:#220e60; font-weight:700; text-align:center; border:0;">Wie können wir dir helfen?</h1><br>
<style>.firstHeading {display:none;}</style>
<form style="text-align: center;" action="/index.php" method="get" class="custom-search-form" style="margin-top: 1em;">
<input type="hidden" name="title" value="Spezial:Suche">
<input id="searchInput" style="border: solid 2px #220e60;" type="search" name="search" placeholder="Shoplytics Wiki durchsuchen...">
</form>
`;
$('#bodyContent').prepend(searchForm);
}
});