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

פסוק איז אפשינעל
אין תקציר עריכה
(פסוק איז אפשינעל)
שורה 83: שורה 83:


             var perek = hebrewNumeralToInt(perekRaw);
             var perek = hebrewNumeralToInt(perekRaw);
             var pasuk = hebrewNumeralToInt(pasukRaw);
             var pasuk = pasukRaw ? hebrewNumeralToInt(pasukRaw) : null;


             // Construct Sefaria URL
             // Construct Sefaria URL
             var sefariaUrl = 'https://www.sefaria.org/' + encodeURIComponent(sefariaNames.english) + '.' + perek + '.' + pasuk;
             var sefariaUrl = 'https://www.sefaria.org/' + encodeURIComponent(sefariaNames.english) + '.' + perek;
    if (pasuk !== null) {
        sefariaUrl += '.' + pasuk;
    }


             // Create and append the Sefaria icon
             // Create and append the Sefaria icon
שורה 97: שורה 100:


             // Construct AlHaTorah URL
             // Construct AlHaTorah URL
             var alHaTorahUrl = 'https://mg.alhatorah.org/Full/' + encodeURIComponent(sefariaNames.alHaTorah) + '/' + perek + '.' + pasuk;
             var alHaTorahUrl = 'https://mg.alhatorah.org/Full/' + encodeURIComponent(sefariaNames.alHaTorah) + '/' + perek;
    if (pasuk !== null) {
        alHaTorahUrl += '.' + pasuk;
    }


             // Create and append the AlHaTorah icon
             // Create and append the AlHaTorah icon
שורה 107: שורה 113:
             $link.after(alHaTorahIcon);
             $link.after(alHaTorahIcon);


             // Construct Wikisource URL (Hebrew names and numbers as-is)
             // Construct Wikisource URL
             var wikiSourceUrl = 'https://he.wikisource.org/wiki/' +
             var wikiSourceUrl = 'https://he.wikisource.org/wiki/' + encodeURIComponent(sefer + '_' + perekRaw);
    'קטגוריה:' + encodeURIComponent(sefer + '_' + perekRaw + '_' + pasukRaw);
    if (pasukRaw) {
        wikiSourceUrl += '_' + pasukRaw;
    }


             // Create and append the Wikisource icon
             // Create and append the Wikisource icon
שורה 116: שורה 124:
                 .attr('target', '_blank')
                 .attr('target', '_blank')
                 .attr('title', 'עפן אין ויקיטקסט')
                 .attr('title', 'עפן אין ויקיטקסט')
                 .html('<img src="' + wikiSourceFavicon + '" alt="AlHaTorah" style="width:12px; height:12px; vertical-align:middle; margin-left: 3px;">');
                 .html('<img src="' + wikiSourceFavicon + '" alt="Wikisource" style="width:12px; height:12px; vertical-align:middle; margin-left: 3px;">');
             $link.after(wikiSourceIcon);
             $link.after(wikiSourceIcon);