MediaWiki:Common.js: Revizyonlar arasındaki fark

korna ansiklopedisi sitesinden
Gezinti kısmına atlaArama kısmına atla
("→‎Buraya konulacak JavaScript kodu sitedeki her kullanıcı için her sayfa yüklendiğinde çalışacaktır: // MediaWiki:Common.js $(function() { var socialLinks = [ { text: 'Discord', url: 'https://discord.gg/örneklink' }, { text: 'Telegram', url: 'https://t.me/örneklink' }, { text: 'DeviantArt', url: 'https://deviantart.com/örneklink' }, { text: 'Steam', url: 'https://steamcommunity.com/örneklink' } ];..." içeriğiyle yeni sayfa oluşturdu)
 
Değişiklik özeti yok
1. satır: 1. satır:
/* Buraya konulacak JavaScript kodu sitedeki her kullanıcı için her sayfa yüklendiğinde çalışacaktır */
/* Buraya konulacak JavaScript kodu sitedeki her kullanıcı için her sayfa yüklendiğinde çalışacaktır */
// MediaWiki:Common.js
$(function() {
$(function() {
    // Sosyal medya linkleri
     var socialLinks = [
     var socialLinks = [
         { text: 'Discord', url: 'https://discord.gg/örneklink' },
         { id: 'discord', url: 'https://discord.gg/link', title: 'Discord' },
         { text: 'Telegram', url: 'https://t.me/örneklink' },
         { id: 'telegram', url: 'https://t.me/link', title: 'Telegram' },
         { text: 'DeviantArt', url: 'https://deviantart.com/örneklink' },
         { id: 'deviantart', url: 'https://deviantart.com/link', title: 'DeviantArt' },
         { text: 'Steam', url: 'https://steamcommunity.com/örneklink' }
         { id: 'steam', url: 'https://steamcommunity.com/link', title: 'Steam' }
     ];
     ];


     var $personal = $('#p-personal ul');
    // Çubuğu oluştur
     var $socialBar = $('<div id="top-social-bar"></div>');
      
      
    // Linkleri ekle
     socialLinks.forEach(function(link) {
     socialLinks.forEach(function(link) {
         $personal.append(
         $socialBar.append(
             $('<li>').append(
             $('<a>', {
                 $('<a>', {
                 id: 'top-social-' + link.id,
                    href: link.url,
                href: link.url,
                    text: link.text,
                title: link.title,
                    target: '_blank'
                'aria-label': link.title,
                })
                target: '_blank'
            )
            }).text(link.title)
         );
         );
     });
     });
    // Sayfanın en üstüne ekle (başlığın üzerine)
    $('#mw-content-container').prepend($socialBar);
});
});

23.58, 2 Nisan 2025 tarihindeki hâli

/* Buraya konulacak JavaScript kodu sitedeki her kullanıcı için her sayfa yüklendiğinde çalışacaktır */
$(function() {
    // Sosyal medya linkleri
    var socialLinks = [
        { id: 'discord', url: 'https://discord.gg/link', title: 'Discord' },
        { id: 'telegram', url: 'https://t.me/link', title: 'Telegram' },
        { id: 'deviantart', url: 'https://deviantart.com/link', title: 'DeviantArt' },
        { id: 'steam', url: 'https://steamcommunity.com/link', title: 'Steam' }
    ];

    // Çubuğu oluştur
    var $socialBar = $('<div id="top-social-bar"></div>');
    
    // Linkleri ekle
    socialLinks.forEach(function(link) {
        $socialBar.append(
            $('<a>', {
                id: 'top-social-' + link.id,
                href: link.url,
                title: link.title,
                'aria-label': link.title,
                target: '_blank'
            }).text(link.title)
        );
    });

    // Sayfanın en üstüne ekle (başlığın üzerine)
    $('#mw-content-container').prepend($socialBar);
});