MediaWiki:Common.js: Unterschied zwischen den Versionen
Aus Shoplytics Wiki
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 18: | Zeile 18: | ||
if (mw.config.get('wgUserName') === null) { | if (mw.config.get('wgUserName') === null) { | ||
$('.dropdown-toggle').each(function () { | $('.dropdown-toggle').each(function () { | ||
const label = $(this).text().trim(); | |||
if (label === 'Werkzeuge' || label === 'Aktionen') { | |||
$(this).closest('.dropdown').hide(); | $(this).closest('.dropdown').hide(); | ||
} | } | ||
Aktuelle Version vom 21. April 2025, 10:55 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 () {
const label = $(this).text().trim();
if (label === 'Werkzeuge' || label === 'Aktionen') {
$(this).closest('.dropdown').hide();
}
});
}
});