کتاب مقدس آنلاین: تفاوت میان نسخهها
ظاهر
بدون خلاصۀ ویرایش |
بدون خلاصۀ ویرایش |
||
| (۲۹ نسخهٔ میانیِ ایجادشده توسط همین کاربر نشان داده نشد) | |||
| خط ۶: | خط ۶: | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | ||
<style> | <style> | ||
:root { | :root { | ||
--primary-color: #2c3e50; | --primary-color: #2c3e50; | ||
| خط ۳۱: | خط ۳۰: | ||
padding: 0; | padding: 0; | ||
margin: 0; | margin: 0; | ||
} | |||
/* مخفی کردن هدرهای اضافی ویکی */ | |||
body > header:first-child, | |||
.wiki-header, | |||
.mw-header, | |||
#mw-header, | |||
#header, | |||
.header { | |||
display: none !important; | |||
} | } | ||
| خط ۵۶: | خط ۶۵: | ||
gap: 8px; | gap: 8px; | ||
margin-bottom: 12px; | margin-bottom: 12px; | ||
font-size: | font-size: 1.1rem; | ||
color: var(--dark-color); | color: var(--dark-color); | ||
direction: rtl; | direction: rtl; | ||
| خط ۹۳: | خط ۱۰۲: | ||
.description { | .description { | ||
color: | color:#808080; | ||
font-size: 1rem; | font-size:1rem; | ||
font-style: italic; | font-style: italic; | ||
margin-top: 5px; | margin-top: 5px; | ||
| خط ۲۲۵: | خط ۲۳۴: | ||
gap: 8px; | gap: 8px; | ||
padding: 12px 20px; | padding: 12px 20px; | ||
background-color: | background-color: #87CEEB; | ||
color: | color: #000000; | ||
text-decoration: none; | text-decoration: none; | ||
border-radius: 6px; | border-radius: 6px; | ||
| خط ۲۶۶: | خط ۲۷۵: | ||
margin-bottom: 15px; | margin-bottom: 15px; | ||
font-size: 1.5rem; | font-size: 1.5rem; | ||
} | |||
.info-message { | |||
text-align: center; | |||
padding: 10px; | |||
background: #e7f3ff; | |||
border-radius: 5px; | |||
margin-top: 10px; | |||
font-size: 0.9rem; | |||
color: #0066cc; | |||
} | } | ||
| خط ۳۴۹: | خط ۳۶۸: | ||
} | } | ||
/* استایل برای حالت انتخاب نشده */ | |||
.placeholder { | .placeholder { | ||
display: flex; | display: flex; | ||
| خط ۳۶۵: | خط ۳۸۵: | ||
} | } | ||
/* استایل برای راستچین کامل */ | |||
option { | option { | ||
direction: rtl; | direction: rtl; | ||
text-align: right; | text-align: right; | ||
} | } | ||
</style> | </style> | ||
| خط ۴۰۶: | خط ۴۰۰: | ||
<span class="breadcrumb-current">کتاب مقدس</span> | <span class="breadcrumb-current">کتاب مقدس</span> | ||
</nav> | </nav> | ||
<h1>کتاب مقدس</h1> | <h1>کتاب مقدس آنلاین</h1> | ||
<p class="description">مطالعه | <p class="description">مطالعه ترجمههای مختلف بصورت کاربردی با واژه نامه تخصصی<br> | ||
ترجمهٔ هزارهٔ نو و مژده هماکنون قابل مطالعهاند و عهد جدید کامل شده است. واژهنامهها بهصورت روزانه و با دقت در حال اتصال و بهروزرسانی هستند تا خدمتی ماندگار برای نسل حال و آیندگان در خداوند بهجا بگذاریم.</p> | |||
</div> | </div> | ||
| خط ۴۲۴: | خط ۴۱۹: | ||
]; | ]; | ||
// تابع بررسی مجاز بودن دامنه | |||
function isDomainAllowed() { | function isDomainAllowed() { | ||
const currentDomain = window.location.hostname; | const currentDomain = window.location.hostname; | ||
console.log('🔍 بررسی دامنه:', currentDomain); | |||
// اگر روی فایل محلی هستیم، اجازه بده | |||
if (!currentDomain || currentDomain === '' || currentDomain === 'null') { | if (!currentDomain || currentDomain === '' || currentDomain === 'null') { | ||
console.log('✅ فایل محلی - مجاز'); | |||
return true; | return true; | ||
} | } | ||
const isAllowed = ALLOWED_DOMAINS.some(domain => { | |||
const match = currentDomain === domain || currentDomain.endsWith('.' + domain); | |||
if (match) { | |||
console.log(`✅ دامنه ${currentDomain} مجاز است`); | |||
} | |||
return match; | |||
}); | }); | ||
if (!isAllowed) { | |||
console.log(`❌ دامنه ${currentDomain} غیرمجاز است`); | |||
} | |||
return isAllowed; | |||
} | } | ||
// تابع نمایش پیام دسترسی غیرمجاز | |||
function showAccessDenied() { | function showAccessDenied() { | ||
const wrapper = document.getElementById('content-wrapper'); | const wrapper = document.getElementById('content-wrapper'); | ||
| خط ۴۴۶: | خط ۴۵۶: | ||
</div> | </div> | ||
`; | `; | ||
} | |||
// تابع اصلی بارگذاری برنامه | |||
function loadApplication() { | |||
console.log('🚀 شروع بارگذاری با بررسی امنیتی...'); | |||
if (!isDomainAllowed()) { | |||
console.log('❌ دسترسی غیرمجاز - نمایش پیام خطا'); | |||
showAccessDenied(); | |||
return; | |||
} | |||
console.log('✅ دامنه مجاز - بارگذاری برنامه اصلی'); | |||
// اگر دامنه مجاز باشد، برنامه اصلی بارگذاری میشود | |||
initializeBibleApp(); | |||
} | } | ||
| خط ۴۹۶: | خط ۵۲۱: | ||
{ 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: "کتاب مکاشفه " } | ||
] | ] | ||
}; | }; | ||
// 🔧 برنامه اصلی کتاب مقدس | |||
function initializeBibleApp() { | function initializeBibleApp() { | ||
const wrapper = document.getElementById('content-wrapper'); | const wrapper = document.getElementById('content-wrapper'); | ||
// ایجاد ساختار HTML برنامه | |||
wrapper.innerHTML = ` | wrapper.innerHTML = ` | ||
<div class="selector-container"> | <div class="selector-container"> | ||
| خط ۵۷۲: | خط ۵۹۹: | ||
</div> | </div> | ||
</div> | </div> | ||
</div> | |||
<div class="info-message"> | |||
<i class="fas fa-info-circle"></i> | |||
واژه ها در همین پنجره نمایش داده میشوند. برای تجربه بهتر مطالعه واژه در تب جدید: راست کلیک → Open in new tab | |||
</div> | </div> | ||
| خط ۵۹۳: | خط ۶۲۵: | ||
`; | `; | ||
// دادههای ترجمههای مختلف | |||
const translations = { | const translations = { | ||
'old': { | 'old': { | ||
| خط ۵۹۸: | خط ۶۳۱: | ||
baseUrl: 'https://www.pediabible.com/index.php?title=', | baseUrl: 'https://www.pediabible.com/index.php?title=', | ||
getPageTitle: function(bookDisplayName, chapter) { | getPageTitle: function(bookDisplayName, chapter) { | ||
return bookDisplayName | return `${bookDisplayName} فصل ${chapter}`; | ||
} | } | ||
}, | }, | ||
| خط ۶۰۵: | خط ۶۳۸: | ||
baseUrl: 'https://www.pediabible.com/index.php?title=', | baseUrl: 'https://www.pediabible.com/index.php?title=', | ||
getPageTitle: function(bookDisplayName, chapter) { | getPageTitle: function(bookDisplayName, chapter) { | ||
return bookDisplayName | return `${bookDisplayName} هزاره نو فصل ${chapter}`; | ||
} | } | ||
}, | }, | ||
| خط ۶۱۲: | خط ۶۴۵: | ||
baseUrl: 'https://www.pediabible.com/index.php?title=', | baseUrl: 'https://www.pediabible.com/index.php?title=', | ||
getPageTitle: function(bookDisplayName, chapter) { | getPageTitle: function(bookDisplayName, chapter) { | ||
return bookDisplayName | return `${bookDisplayName} مژده فصل ${chapter}`; | ||
} | } | ||
}, | }, | ||
| خط ۶۱۹: | خط ۶۵۲: | ||
baseUrl: 'https://www.pediabible.com/index.php?title=', | baseUrl: 'https://www.pediabible.com/index.php?title=', | ||
getPageTitle: function(bookDisplayName, chapter) { | getPageTitle: function(bookDisplayName, chapter) { | ||
return bookDisplayName | return `${bookDisplayName} دانشنامه فصل ${chapter}`; | ||
} | } | ||
} | } | ||
}; | }; | ||
// عناصر DOM | |||
const translationSelect = document.getElementById('translation-select'); | const translationSelect = document.getElementById('translation-select'); | ||
const testamentSelect = document.getElementById('testament-select'); | const testamentSelect = document.getElementById('testament-select'); | ||
| خط ۶۳۴: | خط ۶۶۸: | ||
const wikiPageLink = document.getElementById('wiki-page-link'); | const wikiPageLink = document.getElementById('wiki-page-link'); | ||
// متغیرهای وضعیت فعلی | |||
let currentTranslation = ''; | let currentTranslation = ''; | ||
let currentTestament = ''; | let currentTestament = ''; | ||
| خط ۶۳۹: | خط ۶۷۴: | ||
let currentChapter = 1; | let currentChapter = 1; | ||
// رویداد تغییر ترجمه | |||
translationSelect.addEventListener('change', function() { | translationSelect.addEventListener('change', function() { | ||
currentTranslation = this.value; | currentTranslation = this.value; | ||
| خط ۶۵۵: | خط ۶۹۱: | ||
}); | }); | ||
// رویداد تغییر عهد | |||
testamentSelect.addEventListener('change', function() { | testamentSelect.addEventListener('change', function() { | ||
currentTestament = this.value; | currentTestament = this.value; | ||
| خط ۶۶۲: | خط ۶۹۹: | ||
bookSelect.innerHTML = '<option value="">انتخاب کتاب</option>'; | bookSelect.innerHTML = '<option value="">انتخاب کتاب</option>'; | ||
bibleBooks[currentTestament].forEach( | bibleBooks[currentTestament].forEach((book, index) => { | ||
const option = document.createElement('option'); | const option = document.createElement('option'); | ||
option.value = index; | option.value = index; | ||
| خط ۶۸۱: | خط ۷۱۸: | ||
}); | }); | ||
// رویداد تغییر کتاب | |||
bookSelect.addEventListener('change', function() { | bookSelect.addEventListener('change', function() { | ||
currentBook = this.value; | currentBook = this.value; | ||
| خط ۶۹۴: | خط ۷۳۲: | ||
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); | ||
} | } | ||
| خط ۷۰۸: | خط ۷۴۶: | ||
}); | }); | ||
// رویداد تغییر فصل | |||
chapterSelect.addEventListener('change', function() { | chapterSelect.addEventListener('change', function() { | ||
currentChapter = parseInt(this.value); | currentChapter = parseInt(this.value); | ||
| خط ۷۱۸: | خط ۷۵۷: | ||
}); | }); | ||
// نمایش فصل با iframe - فقط محتوای اصلی | |||
function displayChapterWithIframe() { | function displayChapterWithIframe() { | ||
const bookIndex = parseInt(currentBook); | const bookIndex = parseInt(currentBook); | ||
| خط ۷۲۵: | خط ۷۶۵: | ||
const translationName = translations[currentTranslation].name; | const translationName = translations[currentTranslation].name; | ||
chapterTitle.textContent = translationName | chapterTitle.textContent = `${translationName} - ${bookName} - فصل ${currentChapter}`; | ||
const pageTitle = translations[currentTranslation].getPageTitle(bookDisplayName, currentChapter); | const pageTitle = translations[currentTranslation].getPageTitle(bookDisplayName, currentChapter); | ||
const contentUrl = translations[currentTranslation].baseUrl | const contentUrl = `${translations[currentTranslation].baseUrl}${encodeURIComponent(pageTitle)}&action=render`; | ||
versesContainer.innerHTML = ` | versesContainer.innerHTML = ` | ||
<iframe | <iframe | ||
| خط ۷۳۸: | خط ۷۷۷: | ||
frameborder="0" | frameborder="0" | ||
loading="lazy" | loading="lazy" | ||
sandbox="allow-same-origin allow-forms allow-popups | sandbox="allow-scripts allow-same-origin allow-forms allow-popups" | ||
allowfullscreen> | allowfullscreen> | ||
</iframe> | </iframe> | ||
`; | `; | ||
wikiPageLink.href = translations[currentTranslation].baseUrl | // اضافه کردن sandbox به iframe برای امنیت بیشتر | ||
const iframe = document.getElementById('content-iframe'); | |||
wikiPageLink.href = `${translations[currentTranslation].baseUrl}${encodeURIComponent(pageTitle)}`; | |||
wikiPageLink.style.display = 'flex'; | wikiPageLink.style.display = 'flex'; | ||
updateNavigationButtons(); | updateNavigationButtons(); | ||
} | } | ||
| خط ۸۲۵: | خط ۸۳۴: | ||
function resetAll() { | function resetAll() { | ||
testamentSelect.disabled = true; | testamentSelect.disabled = true; | ||
testamentSelect.value = | testamentSelect.innerHTML = '<option value="">انتخاب عهد</option>'; | ||
bookSelect.disabled = true; | bookSelect.disabled = true; | ||
bookSelect.innerHTML = '<option value="">انتخاب کتاب</option>'; | bookSelect.innerHTML = '<option value="">انتخاب کتاب</option>'; | ||
| خط ۸۳۲: | خط ۸۴۱: | ||
resetContent(); | resetContent(); | ||
} | } | ||
console.log('✅ برنامه کتاب مقدس روی دامنه مجاز بارگذاری شد'); | |||
} | } | ||
// شروع برنامه | // 🔒 شروع برنامه با بررسی امنیتی | ||
document.addEventListener('DOMContentLoaded', function() { | document.addEventListener('DOMContentLoaded', function() { | ||
console.log('🚀 شروع بارگذاری با بررسی امنیتی...'); | |||
loadApplication(); | |||
}); | |||
// 🔒 جلوگیری از دسترسی به توابع از کنسول | |||
Object.defineProperty(window, 'translations', { | |||
value: null, | |||
writable: false, | |||
configurable: false | |||
}); | }); | ||
</script> | </script> | ||
</body> | </body> | ||
</html> | </html> | ||
نسخهٔ کنونی تا ۱۱ اکتبر ۲۰۲۵، ساعت ۲۲:۰۹
کتاب مقدس آنلاین
مطالعه ترجمههای مختلف بصورت کاربردی با واژه نامه تخصصی
ترجمهٔ هزارهٔ نو و مژده هماکنون قابل مطالعهاند و عهد جدید کامل شده است. واژهنامهها بهصورت روزانه و با دقت در حال اتصال و بهروزرسانی هستند تا خدمتی ماندگار برای نسل حال و آیندگان در خداوند بهجا بگذاریم.