کتاب مقدس آنلاین: تفاوت میان نسخهها
ظاهر
بدون خلاصۀ ویرایش |
بدون خلاصۀ ویرایش |
||
| خط ۵۱۰: | خط ۵۱۰: | ||
{ name: "لوقا", chapters: 24, displayName: "انجیل به قلم لوقا" }, | { name: "لوقا", chapters: 24, displayName: "انجیل به قلم لوقا" }, | ||
{ name: "یوحنا", chapters: 21, displayName: "انجیل به قلم یوحنا" }, | { name: "یوحنا", chapters: 21, displayName: "انجیل به قلم یوحنا" }, | ||
{ name: "اعمال ", chapters: 28, displayName: "اعمال " }, | { name: "اعمال", chapters: 28, displayName: "اعمال" }, | ||
{ name: "رومیان", chapters: 16, displayName: "رساله به رومیان" }, | { name: "رومیان", chapters: 16, displayName: "رساله به رومیان" }, | ||
{ name: "اول قرنتیان", chapters: 16, displayName: "رساله اول به قرنتیان" }, | { name: "اول قرنتیان", chapters: 16, displayName: "رساله اول به قرنتیان" }, | ||
| خط ۵۳۲: | خط ۵۳۲: | ||
{ name: "سوم یوحنا", chapters: 1, displayName: "رساله سوم یوحنا" }, | { name: "سوم یوحنا", chapters: 1, displayName: "رساله سوم یوحنا" }, | ||
{ name: "یهودا", chapters: 1, displayName: "رساله یهودا" }, | { name: "یهودا", chapters: 1, displayName: "رساله یهودا" }, | ||
{ name: "کتاب مکاشفه", chapters: 22, displayName: "کتاب مکاشفه " } | { name: "کتاب مکاشفه", chapters: 22, displayName: "کتاب مکاشفه" } | ||
] | ] | ||
}; | }; | ||
| خط ۷۱۶: | خط ۷۱۶: | ||
const option = document.createElement('option'); | const option = document.createElement('option'); | ||
option.value = i; | option.value = i; | ||
option.textContent = | option.textContent = 'فصل ' + i; | ||
chapterSelect.appendChild(option); | chapterSelect.appendChild(option); | ||
} | } | ||
| خط ۷۴۹: | خط ۷۴۹: | ||
const translationName = translations[currentTranslation].name; | const translationName = translations[currentTranslation].name; | ||
chapterTitle.textContent = | chapterTitle.textContent = translationName + ' - ' + bookName + ' - فصل ' + currentChapter; | ||
// استفاده از الگوی مناسب برای هر ترجمه | // استفاده از الگوی مناسب برای هر ترجمه | ||
| خط ۷۵۵: | خط ۷۵۵: | ||
// استفاده از action=render برای نمایش فقط محتوای اصلی | // استفاده از action=render برای نمایش فقط محتوای اصلی | ||
const contentUrl = | const contentUrl = translations[currentTranslation].baseUrl + encodeURIComponent(pageTitle) + '&action=render'; | ||
versesContainer.innerHTML = ` | versesContainer.innerHTML = ` | ||
| خط ۷۶۹: | خط ۷۶۹: | ||
// لینک صفحه کامل برای باز کردن در تب جدید | // لینک صفحه کامل برای باز کردن در تب جدید | ||
wikiPageLink.href = | wikiPageLink.href = translations[currentTranslation].baseUrl + encodeURIComponent(pageTitle); | ||
wikiPageLink.style.display = 'flex'; | wikiPageLink.style.display = 'flex'; | ||
updateNavigationButtons(); | updateNavigationButtons(); | ||
| خط ۷۸۹: | خط ۷۸۹: | ||
const links = iframeDoc.querySelectorAll('a'); | const links = iframeDoc.querySelectorAll('a'); | ||
links.forEach(link | links.forEach(function(link) { | ||
// بررسی آیا لینک داخلی است (به صفحات ویکی اشاره میکند) | // بررسی آیا لینک داخلی است (به صفحات ویکی اشاره میکند) | ||
if (link.href && link.href.includes('pediabible.com')) { | if (link.href && link.href.includes('pediabible.com')) { | ||
| خط ۸۰۱: | خط ۸۰۱: | ||
if (titleParam) { | if (titleParam) { | ||
// بارگذاری صفحه جدید در iframe با action=render | // بارگذاری صفحه جدید در iframe با action=render | ||
const newUrl = | const newUrl = translations[currentTranslation].baseUrl + titleParam + '&action=render'; | ||
iframe.src = newUrl; | iframe.src = newUrl; | ||
// بهروزرسانی لینک صفحه کامل | // بهروزرسانی لینک صفحه کامل | ||
wikiPageLink.href = | wikiPageLink.href = translations[currentTranslation].baseUrl + titleParam; | ||
// بهروزرسانی عنوان | // بهروزرسانی عنوان | ||
chapterTitle.textContent = | chapterTitle.textContent = 'صفحه: ' + decodeURIComponent(titleParam); | ||
} | } | ||
}); | }); | ||
| خط ۸۶۳: | خط ۸۶۳: | ||
function resetAll() { | function resetAll() { | ||
testamentSelect.disabled = true; | testamentSelect.disabled = true; | ||
testamentSelect. | testamentSelect.value = ''; | ||
bookSelect.disabled = true; | bookSelect.disabled = true; | ||
bookSelect.innerHTML = '<option value="">انتخاب کتاب</option>'; | bookSelect.innerHTML = '<option value="">انتخاب کتاب</option>'; | ||