Menü aufrufen
Toggle preferences menu
Persönliches Menü aufrufen
Nicht angemeldet
Ihre IP-Adresse wird öffentlich sichtbar sein, wenn Sie Änderungen vornehmen.

MediaWiki:Common.js: Unterschied zwischen den Versionen

MediaWiki-Schnittstellenseite
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 13: Zeile 13:
$(function() {
$(function() {
     var icons = {
     var icons = {
         'n-Discord':    '🎮',
         'n-Discord':    'fab fa-discord',
         'n-Facebook':  '📘',
         'n-Facebook':  'fab fa-facebook-f',
         'n-Instagram':  '📷',
         'n-Instagram':  'fab fa-instagram',
         'n-X':          '🐦',
         'n-X':          'fab fa-x-twitter',
         'n-YouTube':    '▶️',
         'n-YouTube':    'fab fa-youtube',
         'n-Twitch':    '🎥',
         'n-Twitch':    'fab fa-twitch',
         'n-E-Mail':    '✉️',
         'n-E-Mail':    'fas fa-envelope',
         'n-Support-us': '❤️'
         'n-Support-us': 'fas fa-heart'
     };
     };


     $.each(icons, function(id, icon) {
     $.each(icons, function(id, cls) {
         $('#' + id + ' a').html('<span style="font-size:1.2rem;line-height:1;">' + icon + '</span>');
         $('#' + id + ' a').html('<i class="' + cls + '"></i>');
     });
     });
});
});

Version vom 15. Juni 2026, 12:08 Uhr

mw.hook('wikipage.content').add(function($content) {
    const headings = document.querySelectorAll('.citizen-section-heading');
    if (headings.length === 0) return;
    
    const sections = document.querySelectorAll('.citizen-section');
    sections.forEach(function(section, index) {
        if (index === 0) return; // Einleitungstext überspringen
        section.hidden = 'until-found';
    });
});

// Social Icons in Sidebar ersetzen
$(function() {
    var icons = {
        'n-Discord':    'fab fa-discord',
        'n-Facebook':   'fab fa-facebook-f',
        'n-Instagram':  'fab fa-instagram',
        'n-X':          'fab fa-x-twitter',
        'n-YouTube':    'fab fa-youtube',
        'n-Twitch':     'fab fa-twitch',
        'n-E-Mail':     'fas fa-envelope',
        'n-Support-us': 'fas fa-heart'
    };

    $.each(icons, function(id, cls) {
        $('#' + id + ' a').html('<i class="' + cls + '"></i>');
    });
});