MediaWiki:Common.js

korna ansiklopedisi sitesinden
Gezinti kısmına atlaArama kısmına atla

Not: Yayımladıktan sonra değişiklikleri görmek için tarayıcınızın önbelleğini temizlemeniz gerekebilir.

  • Firefox / Safari: Shift tuşuna basılıyken Yeniden Yükle'ye tıklayın ya da Ctrl-F5 ya da Ctrl-R tıklayın (Mac için ⌘-R).
  • Google Chrome: Ctrl-Shift-R'ye basın. (Mac için ⌘-Shift-R)
  • Internet Explorer / Edge: Ctrl basılıyken Yenile'ye tıklayın ya da Ctrl-F5 yapın.
  • Opera: Ctrl-F5 tıklayın.
$(function() {
    // 1. SOSYAL MEDYA LİNKLERİ
    var links = [
        { 
            icon: '//ansiklopedi.videoliq.com.tr/images/d/dd/Discord.png?20250402213537',
            text: 'Discord', 
            url: 'https://discord.gg/a4jGxPkHTc' 
        },
        {
            icon: '//upload.wikimedia.org/wikipedia/commons/8/82/Telegram_logo.svg',
            text: 'Telegram',
            url: 'https://videoliq.com.tr/acmadik.php'
        },
        {
            icon: '//ansiklopedi.videoliq.com.tr/images/7/76/Sitwatch.png?20250402214911',
            text: 'SitWatch',
            url: 'https://sitwatch.net/profile/EncyclopediaKorna'
        },
        {
            icon: '//upload.wikimedia.org/wikipedia/commons/8/83/Steam_icon_logo.svg',
            text: 'Steam',
            url: 'https://videoliq.com.tr/acmadik.php'
        }
    ];

    // 2. SOSYAL MEDYA BARINI OLUŞTUR VE EKLE (EKSİK OLAN KISIM)
    var $socialBar = $('<div id="korna-social-header"></div>');
    var $linksContainer = $('<div id="korna-social-links"></div>');
    
    links.forEach(function(link) {
        $linksContainer.append(
            $('<a>', {
                href: link.url,
                title: link.text,
                target: '_blank'
            })
            .append($('<img>', { src: link.icon, alt: link.text }))
            .append(link.text)
        );
    });

    $socialBar.append($linksContainer);
    $('#firstHeading').before($socialBar); // BU SATIR EKLENDİ

    // 3. MEDIAVIEWER AYARLARI
    $(document).on('click', 'a.image', function(e) {
        e.preventDefault();
        e.stopPropagation();
        
        var imgUrl = $(this).attr('href').replace('/Dosya:', '/File:');
        
        mw.loader.using(['mmv'], function() {
            if (mw.mmv && mw.mmv.lightboxbox) {
                mw.mmv.lightboxbox.open(imgUrl);
            } else {
                window.open(imgUrl.replace('/index.php/File:', '/images/'), '_self');
            }
        }, function() {
            window.open(imgUrl.replace('/index.php/File:', '/images/'), '_self');
        });
    });
});