MediaWiki:Common.js: Revizyonlar arasındaki fark
korna ansiklopedisi sitesinden
Gezinti kısmına atlaArama kısmına atla
Değişiklik özeti yok |
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 = [ | ||
{ | { | ||
icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v5/icons/discord.svg', | |||
text: 'Discord', | |||
url: 'https://discord.gg/link' | |||
}, | |||
{ | |||
icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v5/icons/telegram.svg', | |||
text: 'Telegram', | |||
url: 'https://t.me/link' | |||
}, | |||
{ | |||
icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v5/icons/deviantart.svg', | |||
text: 'DeviantArt', | |||
url: 'https://deviantart.com/link' | |||
}, | |||
{ | |||
icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v5/icons/steam.svg', | |||
text: 'Steam', | |||
url: 'https://steamcommunity.com/link' | |||
} | |||
]; | ]; | ||
// | // Container oluştur | ||
var $ | var $container = $('<div id="monobook-social-container"></div>'); | ||
var $links = $('<div id="monobook-social-links"></div>'); | |||
// Linkleri ekle | // Linkleri ekle | ||
socialLinks.forEach(function(link) { | socialLinks.forEach(function(link) { | ||
$ | $links.append( | ||
$('<a>', { | $('<a>', { | ||
href: link.url, | href: link.url, | ||
title: link. | title: link.text, | ||
target: '_blank' | target: '_blank' | ||
}) | |||
.append($('<img>', { src: link.icon, alt: '' })) | |||
.append(link.text) | |||
); | ); | ||
}); | }); | ||
// | // Yerleştirme (personal bar altına) | ||
$('# | $container.append($links); | ||
$('#p-personal').after($container); | |||
}); | }); |
00.02, 3 Nisan 2025 tarihindeki hâli
/* Buraya konulacak JavaScript kodu sitedeki her kullanıcı için her sayfa yüklendiğinde çalışacaktır */ /* MediaWiki:Common.js */ $(function() { // Sosyal medya linkleri var socialLinks = [ { icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v5/icons/discord.svg', text: 'Discord', url: 'https://discord.gg/link' }, { icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v5/icons/telegram.svg', text: 'Telegram', url: 'https://t.me/link' }, { icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v5/icons/deviantart.svg', text: 'DeviantArt', url: 'https://deviantart.com/link' }, { icon: 'https://cdn.jsdelivr.net/npm/simple-icons@v5/icons/steam.svg', text: 'Steam', url: 'https://steamcommunity.com/link' } ]; // Container oluştur var $container = $('<div id="monobook-social-container"></div>'); var $links = $('<div id="monobook-social-links"></div>'); // Linkleri ekle socialLinks.forEach(function(link) { $links.append( $('<a>', { href: link.url, title: link.text, target: '_blank' }) .append($('<img>', { src: link.icon, alt: '' })) .append(link.text) ); }); // Yerleştirme (personal bar altına) $container.append($links); $('#p-personal').after($container); });