کتاب مقدس آنلاین: تفاوت میان نسخهها
ظاهر
بدون خلاصۀ ویرایش |
بدون خلاصۀ ویرایش |
||
| خط ۲۸۱: | خط ۲۸۱: | ||
padding: 8px 10px; | padding: 8px 10px; | ||
} | } | ||
.app-header { | .app-header { | ||
margin-bottom: 15px; | margin-bottom: 15px; | ||
padding: 12px 15px; | padding: 12px 15px; | ||
} | } | ||
.breadcrumb { | .breadcrumb { | ||
font-size: 0.85rem; | font-size: 0.85rem; | ||
margin-bottom: 10px; | margin-bottom: 10px; | ||
} | } | ||
.app-header h1 { | .app-header h1 { | ||
font-size: 1.5rem; | font-size: 1.5rem; | ||
margin-bottom: 6px; | margin-bottom: 6px; | ||
} | } | ||
.description { | .description { | ||
font-size: 0.9rem; | font-size: 0.9rem; | ||
} | } | ||
.selector-container { | .selector-container { | ||
grid-template-columns: 1fr; | grid-template-columns: 1fr; | ||
| خط ۳۰۷: | خط ۳۰۲: | ||
padding: 15px; | padding: 15px; | ||
} | } | ||
.bible-content { | .bible-content { | ||
padding: 15px; | padding: 15px; | ||
min-height: 450px; | min-height: 450px; | ||
} | } | ||
.chapter-title { | .chapter-title { | ||
font-size: 1.3rem; | font-size: 1.3rem; | ||
margin-bottom: 15px; | margin-bottom: 15px; | ||
} | } | ||
.content-display { | .content-display { | ||
height: 500px; | height: 500px; | ||
} | } | ||
.navigation { | .navigation { | ||
flex-direction: column; | flex-direction: column; | ||
gap: 10px; | gap: 10px; | ||
} | } | ||
.nav-btn, .wiki-link { | .nav-btn, .wiki-link { | ||
width: 100%; | width: 100%; | ||
| خط ۳۳۷: | خط ۳۲۷: | ||
height: 450px; | height: 450px; | ||
} | } | ||
.nav-btn, .wiki-link { | .nav-btn, .wiki-link { | ||
padding: 10px 15px; | padding: 10px 15px; | ||
font-size: 0.9rem; | font-size: 0.9rem; | ||
} | } | ||
.instructions { | .instructions { | ||
padding: 30px 15px; | padding: 30px 15px; | ||
font-size: 1rem; | font-size: 1rem; | ||
} | } | ||
.app-header { | .app-header { | ||
padding: 10px 12px; | padding: 10px 12px; | ||
} | } | ||
.app-header h1 { | .app-header h1 { | ||
font-size: 1.3rem; | font-size: 1.3rem; | ||
| خط ۳۹۷: | خط ۳۸۳: | ||
<script> | <script> | ||
const ALLOWED_DOMAINS = [ | const ALLOWED_DOMAINS = [ | ||
'pediabible.com', | 'pediabible.com', | ||
| خط ۴۰۷: | خط ۳۹۲: | ||
function isDomainAllowed() { | function isDomainAllowed() { | ||
const currentDomain = window.location.hostname; | const currentDomain = window.location.hostname; | ||
if (!currentDomain || currentDomain === '' || currentDomain === 'null') | if (!currentDomain || currentDomain === '' || currentDomain === 'null') return true; | ||
return ALLOWED_DOMAINS.some(domain => | return ALLOWED_DOMAINS.some(domain => | ||
currentDomain === domain || currentDomain.endsWith('.' + domain) | currentDomain === domain || currentDomain.endsWith('.' + domain) | ||
| خط ۵۱۱: | خط ۴۹۴: | ||
if (!href) return; | if (!href) return; | ||
if (href.startsWith('/') || href.includes('pediabible.com')) { | if (href.startsWith('/') || href.includes('pediabible.com')) { | ||
link.addEventListener('click', function(e) { | link.addEventListener('click', function(e) { | ||
| خط ۵۲۴: | خط ۵۰۶: | ||
let title = url.searchParams.get('title'); | let title = url.searchParams.get('title'); | ||
if (!title) { | if (!title) { | ||
const path = url.pathname; | const path = url.pathname; | ||
if (path.includes('/index.php/')) { | if (path.includes('/index.php/')) { | ||
| خط ۵۴۳: | خط ۵۲۴: | ||
}); | }); | ||
} catch (err) { | } catch (err) { | ||
console.debug('دسترسی به iframe محدود شد:', err.message); | |||
console.debug('دسترسی به iframe محدود شد | |||
} | } | ||
} | } | ||
| خط ۶۲۳: | خط ۶۰۳: | ||
name: 'ترجمه قدیم', | name: 'ترجمه قدیم', | ||
baseUrl: 'https://www.pediabible.com/index.php?title=', | baseUrl: 'https://www.pediabible.com/index.php?title=', | ||
getPageTitle: | getPageTitle: (bookDisplayName, chapter) => `${bookDisplayName} فصل ${chapter}` | ||
}, | }, | ||
'hejre_nou': { | 'hejre_nou': { | ||
name: 'هزاره نو', | name: 'هزاره نو', | ||
baseUrl: 'https://www.pediabible.com/index.php?title=', | baseUrl: 'https://www.pediabible.com/index.php?title=', | ||
getPageTitle: | getPageTitle: (bookDisplayName, chapter) => `${bookDisplayName} هزاره نو فصل ${chapter}` | ||
}, | }, | ||
'mozde': { | 'mozde': { | ||
name: 'مژده', | name: 'مژده', | ||
baseUrl: 'https://www.pediabible.com/index.php?title=', | baseUrl: 'https://www.pediabible.com/index.php?title=', | ||
getPageTitle: | getPageTitle: (bookDisplayName, chapter) => `${bookDisplayName} مژده فصل ${chapter}` | ||
}, | }, | ||
'daneshname': { | 'daneshname': { | ||
name: 'دانشنامه', | name: 'دانشنامه', | ||
baseUrl: 'https://www.pediabible.com/index.php?title=', | baseUrl: 'https://www.pediabible.com/index.php?title=', | ||
getPageTitle: | getPageTitle: (bookDisplayName, chapter) => `${bookDisplayName} دانشنامه فصل ${chapter}` | ||
} | } | ||
}; | }; | ||
| خط ۶۹۷: | خط ۶۶۹: | ||
} | } | ||
function displayChapterWithIframe() { | function displayChapterWithIframe() { | ||
const bookIndex = parseInt(currentBook); | const bookIndex = parseInt(currentBook); | ||
| خط ۷۲۵: | خط ۶۹۶: | ||
updateNavigationButtons(); | updateNavigationButtons(); | ||
const iframe = document.getElementById('content-iframe'); | const iframe = document.getElementById('content-iframe'); | ||
iframe.onload = function() { | iframe.onload = function() { | ||
| خط ۷۳۲: | خط ۷۰۲: | ||
} | } | ||
// ✅ اصلاح: در اینجا باید resetAll() فراخوانی شود | |||
translationSelect.addEventListener('change', function() { | translationSelect.addEventListener('change', function() { | ||
currentTranslation = this.value; | currentTranslation = this.value; | ||
| خط ۷۳۷: | خط ۷۰۸: | ||
testamentSelect.disabled = false; | testamentSelect.disabled = false; | ||
testamentSelect.value = ''; | testamentSelect.value = ''; | ||
bookSelect.disabled = true; | |||
bookSelect.innerHTML = '<option value="">انتخاب کتاب</option>'; | |||
chapterSelect.disabled = true; | |||
chapterSelect.innerHTML = '<option value="">انتخاب فصل</option>'; | |||
resetContent(); | |||
} else { | } else { | ||
resetAll(); | resetAll(); | ||
| خط ۸۱۱: | خط ۷۸۶: | ||
} | } | ||
}); | }); | ||
} | } | ||
| خط ۸۲۳: | خط ۷۹۶: | ||
} | } | ||
document.addEventListener('DOMContentLoaded', | document.addEventListener('DOMContentLoaded', loadApplication); | ||
Object.defineProperty(window, 'translations', { | Object.defineProperty(window, 'translations', { value: null, writable: false, configurable: false }); | ||
</script> | </script> | ||
</body> | </body> | ||
</html> | </html> | ||