אונטערשייד צווישן ווערסיעס פון "באַניצער:תנא קמא/tanachLinks.js"

קיין רעדאגירונג באמערקונג
אין תקציר עריכה
אין תקציר עריכה
שורה 12: שורה 12:
             var pasuk = $link.data('pasuk');
             var pasuk = $link.data('pasuk');


            // Construct the Sefaria URL
                // Construct Sefaria URL
            var sefariaUrl = 'https://www.sefaria.org/' + encodeURIComponent(sefer) + '.' + encodeURIComponent(perek) + '.' + encodeURIComponent(pasuk);
                var sefariaUrl = 'https://www.sefaria.org/' + encodeURIComponent(sefer) + '.' + encodeURIComponent(perek) + '.' + encodeURIComponent(pasuk);


            // Create the Shitufta icon link
                // Create the Shitufta icon link
            var shituftaIcon = $('<a>')
                var shituftaIcon = $('<a>')
                .attr('href', $link.attr('href'))
                    .attr('href', href)
                .attr('target', '_blank')
                    .attr('target', '_blank')
                .attr('title', 'Go to Shitufta')
                    .attr('title', 'Go to Shitufta')
                .html('<img src="' + shituftaFavicon + '" alt="Shitufta" style="width:12px; height:12px; vertical-align:middle; margin-left: 3px;">');
                    .html('<img src="' + shituftaFavicon + '" alt="Shitufta" style="width:12px; height:12px; vertical-align:middle; margin-left: 3px;">');


            // Create the Sefaria icon link
                // Create the Sefaria icon link
            var sefariaIcon = $('<a>')
                var sefariaIcon = $('<a>')
                .attr('href', sefariaUrl)
                    .attr('href', sefariaUrl)
                .attr('target', '_blank')
                    .attr('target', '_blank')
                .attr('title', 'Go to Sefaria')
                    .attr('title', 'Go to Sefaria')
                .html('<img src="' + sefariaFavicon + '" alt="Sefaria" style="width:12px; height:12px; vertical-align:middle; margin-left: 3px;">');
                    .html('<img src="' + sefariaFavicon + '" alt="Sefaria" style="width:12px; height:12px; vertical-align:middle; margin-left: 3px;">');
 
            // Append icons next to the link
                // Append icons next to the link
            $link.after(shituftaIcon, sefariaIcon);
                $link.after(shituftaIcon, sefariaIcon);
        });
            }
    });
        });
    });
});
});