בדוקי עריכות אוטומטית, אינטערפעיס רעדאקטארן, אינטערפעיס אדמיניסטראַטאָרן, סיסאפן, מייבאים, מעדכנים, מייבא, אספקלריה רעדאקטארן
46,538
רעדאגירונגען
(געשאַפן בלאַט מיט 'mw.hook('wikipage.content').add(function($content) { $content.find("span:contains('{{תנ""ך|')").each(function() { var text = $(this).text().trim(); var match = text.match(/^{{תנ"ך\|([^|]+)\|([^|]+)\|([^|]+)}}$/); if (match) { var sefer = match[1].trim(); var perek = match[2].trim(); var pasuk = match[3].trim(); var sefariaUrl = `https://www.sefaria.org/$...') |
אין תקציר עריכה |
||
| שורה 1: | שורה 1: | ||
mw.hook('wikipage.content').add(function($content) { | mw.hook('wikipage.content').add(function($content) { | ||
$content.find(" | console.log("Tanach Citation Script Running"); // Debugging message | ||
var | $content.find(".tanach-citation").each(function() { | ||
var $this = $(this); | |||
console.log("Found citation:", $this.text()); // Debugging each found citation | |||
var sefer = $this.data("sefer"); | |||
var perek = $this.data("perek"); | |||
var pasuk = $this.data("pasuk") || 1; | |||
console.log("Extracted:", sefer, perek, pasuk); // Debugging extracted values | |||
var sefariaUrl = `https://www.sefaria.org/${encodeURIComponent(sefer)}.${perek}.${pasuk}`; | |||
var iconHtml = `<a href="${sefariaUrl}" target="_blank" title="View on Sefaria"> | |||
<img src="https://www.sefaria.org/static/img/favicon.ico" style="width: 16px; height: 16px; vertical-align: middle;" /> | |||
</a>`; | |||
$this.append(' ' + iconHtml); // Append icon to the citation | |||
}); | }); | ||
}); | }); | ||
רעדאגירונגען