באַניצער:תנא קמא/tanachLinks.js
אַכטונג: נאכן היטן, ברויכט איר אפשר נאך אויסקרויזן דעם בראוזער'ס זאַפאַס צו זען די ענדערונגען.
- פייערפוקס/סאפארי: האלט אראפ שיפט בשעת'ן דרוקן Reload, אדער דרוקט Ctrl-F5 אדער Ctrl-R (אויף א מאקינטאש ⌘-R)
- גוגל כראם: דרוקט Ctrl-Shift-R (אויף א מאקינטאש ⌘-Shift-R)
- אינטערנעט עקספלארער: האלט אראפ Ctrl בשעת'ן קליקן Refresh, אדער דרוקט Ctrl-F5
- אפערע: גייט צו מעניו → שטעלונגען ( אפערע → פרעפערנצן אויף א מעק) און דערנאך צו פריוואטקייט & און זיכערהייט → רוימען בראוזער דאטא → בילדער און טעקעס אין זאפאס
mw.loader.using(['mediawiki.util', 'jquery'], function () {
$(document).ready(function () {
// Define favicon URLs
var sefariaFavicon = 'https://www.sefaria.org/static/icons/favicon.ico';
var shituftaFavicon = 'https://shitufta.org.il/newGigLogo.svg';
// Find all links that use the תנ"ך template (Shitufta links)
$('a[href*="shitufta.org.il"]').each(function () {
var $link = $(this);
var href = $link.attr('href');
// Extract book and chapter from the Shitufta URL
var match = href.match(/shitufta\.org\.il\/([^\/]+)\/([^\/]+)/);
if (match) {
var book = decodeURIComponent(match[1]);
var chapter = decodeURIComponent(match[2]);
// Construct Sefaria URL
var sefariaUrl = 'https://www.sefaria.org/' + book + '.' + chapter;
// Create the Shitufta icon link
var shituftaIcon = $('<a>')
.attr('href', href)
.attr('target', '_blank')
.attr('title', 'Go to Shitufta')
.html('<img src="' + shituftaFavicon + '" alt="Shitufta" style="width:12px; height:12px; vertical-align:middle; margin-left: 3px;">');
// Create the Sefaria icon link
var sefariaIcon = $('<a>')
.attr('href', sefariaUrl)
.attr('target', '_blank')
.attr('title', 'Go to Sefaria')
.html('<img src="' + sefariaFavicon + '" alt="Sefaria" style="width:12px; height:12px; vertical-align:middle; margin-left: 3px;">');
// Append icons **next to** the link instead of replacing it
$link.after(shituftaIcon, sefariaIcon);
}
});
});
});