אונטערשייד צווישן ווערסיעס פון "באַניצער:תנא קמא/tanachLinks.js"
קפיצה לניווט
קפיצה לחיפוש
אין תקציר עריכה |
אין תקציר עריכה |
||
| שורה 3: | שורה 3: | ||
// Define favicon URLs | // Define favicon URLs | ||
var sefariaFavicon = 'https://www.sefaria.org/static/icons/favicon.ico'; | var sefariaFavicon = 'https://www.sefaria.org/static/icons/favicon.ico'; | ||
// Iterate over each Tanakh citation link | // Iterate over each Tanakh citation link | ||
| שורה 12: | שורה 11: | ||
var pasuk = $link.data('pasuk'); | var pasuk = $link.data('pasuk'); | ||
// Construct Sefaria URL | |||
var sefariaUrl = 'https://www.sefaria.org/' + encodeURIComponent(sefer) + '.' + encodeURIComponent(perek) + '.' + encodeURIComponent(pasuk); | |||
// Create the Sefaria icon link | |||
var sefariaIcon = $('<a>') | |||
.attr('href', sefariaUrl) | |||
.attr('target', '_blank') | |||
.attr('title', 'עפן אין ספריא') | |||
.html('<img src="' + sefariaFavicon + '" alt="Sefaria" style="width:12px; height:12px; vertical-align:middle; margin-left: 3px;">'); | |||
// Append the Sefaria icon next to the link | |||
$link.after(sefariaIcon); | |||
}); | |||
}); | |||
}); | }); | ||
רעוויזיע פון 00:58, 4 אפריל 2025
mw.loader.using(['mediawiki.util', 'jquery'], function () {
$(document).ready(function () {
// Define favicon URLs
var sefariaFavicon = 'https://www.sefaria.org/static/icons/favicon.ico';
// Iterate over each Tanakh citation link
$('.tanach-citation').each(function () {
var $link = $(this);
var sefer = $link.data('sefer');
var perek = $link.data('perek');
var pasuk = $link.data('pasuk');
// Construct Sefaria URL
var sefariaUrl = 'https://www.sefaria.org/' + encodeURIComponent(sefer) + '.' + encodeURIComponent(perek) + '.' + encodeURIComponent(pasuk);
// Create the Sefaria icon link
var sefariaIcon = $('<a>')
.attr('href', sefariaUrl)
.attr('target', '_blank')
.attr('title', 'עפן אין ספריא')
.html('<img src="' + sefariaFavicon + '" alt="Sefaria" style="width:12px; height:12px; vertical-align:middle; margin-left: 3px;">');
// Append the Sefaria icon next to the link
$link.after(sefariaIcon);
});
});
});