MediaWiki:Common.js: Unterschied zwischen den Versionen
Aus Shoplytics Wiki
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 12: | Zeile 12: | ||
$('#bodyContent').prepend(searchForm); | $('#bodyContent').prepend(searchForm); | ||
} | |||
}); | |||
$(document).ready(function () { | |||
if (mw.config.get('wgUserName') === null) { | |||
$('.dropdown-toggle').each(function () { | |||
if ($(this).text().trim() === 'Werkzeuge') { | |||
$(this).closest('.dropdown').hide(); | |||
} | |||
}); | |||
} | } | ||
}); | }); | ||
Version vom 21. April 2025, 10:54 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, #searchInput {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 style="width:90%;max-width:600px;box-sizing: border-box; border: solid 3px #220e60; border-radius: 3em; padding:15px;" type="search" name="search" placeholder="Shoplytics Wiki durchsuchen...">
</form>
`;
$('#bodyContent').prepend(searchForm);
}
});
$(document).ready(function () {
if (mw.config.get('wgUserName') === null) {
$('.dropdown-toggle').each(function () {
if ($(this).text().trim() === 'Werkzeuge') {
$(this).closest('.dropdown').hide();
}
});
}
});