کتاب مقدس آنلاین: تفاوت میان نسخهها
ظاهر
بدون خلاصۀ ویرایش برچسب: برگرداندهشده |
بدون خلاصۀ ویرایش برچسب: واگردانی دستی |
||
خط ۱: | خط ۱: | ||
<html lang="fa" dir="rtl"> | <html lang="fa" dir="rtl"> | ||
<head> | <head> | ||
خط ۲۷۶: | خط ۲۷۵: | ||
margin-bottom: 15px; | margin-bottom: 15px; | ||
font-size: 1.5rem; | font-size: 1.5rem; | ||
} | } | ||
خط ۵۹۹: | خط ۵۸۸: | ||
</div> | </div> | ||
</div> | </div> | ||
</div> | </div> | ||
خط ۶۳۰: | خط ۶۱۴: | ||
name: 'ترجمه قدیم', | name: 'ترجمه قدیم', | ||
baseUrl: 'https://www.pediabible.com/index.php?title=', | baseUrl: 'https://www.pediabible.com/index.php?title=', | ||
// برای ترجمه قدیم از الگوی ساده با displayName استفاده میکنیم | |||
getPageTitle: function(bookDisplayName, chapter) { | getPageTitle: function(bookDisplayName, chapter) { | ||
return `${bookDisplayName} فصل ${chapter}`; | return `${bookDisplayName} فصل ${chapter}`; | ||
خط ۶۳۷: | خط ۶۲۲: | ||
name: 'هزاره نو', | name: 'هزاره نو', | ||
baseUrl: 'https://www.pediabible.com/index.php?title=', | baseUrl: 'https://www.pediabible.com/index.php?title=', | ||
// برای ترجمههای جدید از displayName + نام ترجمه استفاده میکنیم | |||
getPageTitle: function(bookDisplayName, chapter) { | getPageTitle: function(bookDisplayName, chapter) { | ||
return `${bookDisplayName} هزاره نو فصل ${chapter}`; | return `${bookDisplayName} هزاره نو فصل ${chapter}`; | ||
خط ۷۶۷: | خط ۷۵۳: | ||
chapterTitle.textContent = `${translationName} - ${bookName} - فصل ${currentChapter}`; | chapterTitle.textContent = `${translationName} - ${bookName} - فصل ${currentChapter}`; | ||
// استفاده از الگوی مناسب برای هر ترجمه | |||
const pageTitle = translations[currentTranslation].getPageTitle(bookDisplayName, currentChapter); | const pageTitle = translations[currentTranslation].getPageTitle(bookDisplayName, currentChapter); | ||
// استفاده از action=render برای نمایش فقط محتوای اصلی | |||
const contentUrl = `${translations[currentTranslation].baseUrl}${encodeURIComponent(pageTitle)}&action=render`; | const contentUrl = `${translations[currentTranslation].baseUrl}${encodeURIComponent(pageTitle)}&action=render`; | ||
خط ۷۷۷: | خط ۷۶۶: | ||
frameborder="0" | frameborder="0" | ||
loading="lazy" | loading="lazy" | ||
allowfullscreen> | allowfullscreen> | ||
</iframe> | </iframe> | ||
`; | `; | ||
// | // لینک صفحه کامل برای باز کردن در تب جدید | ||
wikiPageLink.href = `${translations[currentTranslation].baseUrl}${encodeURIComponent(pageTitle)}`; | wikiPageLink.href = `${translations[currentTranslation].baseUrl}${encodeURIComponent(pageTitle)}`; | ||
wikiPageLink.style.display = 'flex'; | wikiPageLink.style.display = 'flex'; |