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 */ | ||
$(function() { | $(function() { | ||
var socialLinks = [ | var socialLinks = [ | ||
{ | { | ||
icon: 'https:// | icon: 'https://www.svgrepo.com/show/353655/discord-icon.svg', | ||
text: 'Discord', | text: 'Discord', | ||
url: 'https://discord.gg/link' | url: 'https://discord.gg/link' | ||
}, | }, | ||
{ | { | ||
icon: 'https:// | icon: 'https://www.svgrepo.com/show/349540/telegram.svg', | ||
text: 'Telegram', | text: 'Telegram', | ||
url: 'https://t.me/link' | url: 'https://t.me/link' | ||
}, | }, | ||
{ | { | ||
icon: 'https:// | icon: 'https://www.svgrepo.com/show/331488/deviantart.svg', | ||
text: 'DeviantArt', | text: 'DeviantArt', | ||
url: 'https://deviantart.com/link' | url: 'https://deviantart.com/link' | ||
}, | }, | ||
{ | { | ||
icon: 'https:// | icon: 'https://www.svgrepo.com/show/349418/steam.svg', | ||
text: 'Steam', | text: 'Steam', | ||
url: 'https://steamcommunity.com/link' | url: 'https://steamcommunity.com/link' | ||
26. satır: | 24. satır: | ||
]; | ]; | ||
var $socialBar = $('<div id="monobook-top-social"></div>'); | var $socialBar = $('<div id="monobook-top-social"></div>'); | ||
var $ | var $links = $('<div id="monobook-top-social-links"></div>'); | ||
socialLinks.forEach(function(link) { | socialLinks.forEach(function(link) { | ||
$ | $links.append( | ||
$('<a>', { | $('<a>', { | ||
href: link.url, | href: link.url, | ||
38. satır: | 34. satır: | ||
target: '_blank' | target: '_blank' | ||
}) | }) | ||
.append($('<img>', { | .append($('<img>', { src: link.icon, alt: link.text })) | ||
.append(link.text) | .append(link.text) | ||
); | ); | ||
}); | }); | ||
// | // EN ÜSTE EKLEME (body'nin ilk elemanı olarak) | ||
$socialBar.append($ | $socialBar.append($links); | ||
$(' | $('body').prepend($socialBar); | ||
// | // Sol menüyü aşağı itme ayarı | ||
$('#column-one').css('margin-top', '50px'); | |||
}); | }); |
00.09, 3 Nisan 2025 tarihindeki hâli
/* Buraya konulacak JavaScript kodu sitedeki her kullanıcı için her sayfa yüklendiğinde çalışacaktır */ $(function() { var socialLinks = [ { icon: 'https://www.svgrepo.com/show/353655/discord-icon.svg', text: 'Discord', url: 'https://discord.gg/link' }, { icon: 'https://www.svgrepo.com/show/349540/telegram.svg', text: 'Telegram', url: 'https://t.me/link' }, { icon: 'https://www.svgrepo.com/show/331488/deviantart.svg', text: 'DeviantArt', url: 'https://deviantart.com/link' }, { icon: 'https://www.svgrepo.com/show/349418/steam.svg', text: 'Steam', url: 'https://steamcommunity.com/link' } ]; var $socialBar = $('<div id="monobook-top-social"></div>'); var $links = $('<div id="monobook-top-social-links"></div>'); socialLinks.forEach(function(link) { $links.append( $('<a>', { href: link.url, title: link.text, target: '_blank' }) .append($('<img>', { src: link.icon, alt: link.text })) .append(link.text) ); }); // EN ÜSTE EKLEME (body'nin ilk elemanı olarak) $socialBar.append($links); $('body').prepend($socialBar); // Sol menüyü aşağı itme ayarı $('#column-one').css('margin-top', '50px'); });