پرش به محتوا

کتاب مقدس آنلاین: تفاوت میان نسخه‌ها

از دانشنامه کتاب مقدس
بدون خلاصۀ ویرایش
بدون خلاصۀ ویرایش
 
(۲۵ نسخهٔ میانیِ ایجادشده توسط همین کاربر نشان داده نشد)
خط ۳۰: خط ۳۰:
             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: 0.9rem;
             font-size: 1.1rem;
             color: var(--dark-color);
             color: var(--dark-color);
             direction: rtl;
             direction: rtl;
خط ۹۲: خط ۱۰۲:
          
          
         .description {
         .description {
             color: var(--accent-color);
             color:#808080;
             font-size: 1rem;
             font-size:1rem;
             font-style: italic;
             font-style: italic;
             margin-top: 5px;
             margin-top: 5px;
خط ۱۷۳: خط ۱۸۳:
         .content-display {
         .content-display {
             width: 100%;
             width: 100%;
             min-height: 600px;
             height: 650px;
            max-height: 700px;
            overflow-y: auto;
             border: 1px solid var(--border-color);
             border: 1px solid var(--border-color);
             border-radius: 6px;
             border-radius: 6px;
             background: white;
             background: white;
            padding: 25px;
            line-height: 2;
            font-size: 1.1rem;
        }
       
        .content-display .verse {
            margin-bottom: 15px;
            padding-right: 15px;
        }
       
        .content-display .verse-number {
            background-color: var(--accent-color);
            color: white;
            padding: 2px 8px;
            border-radius: 50%;
            font-size: 0.8rem;
            margin-left: 5px;
        }
       
        .content-display a {
            color: var(--secondary-color);
            text-decoration: none;
            border-bottom: 1px dotted var(--secondary-color);
            transition: all 0.3s;
            cursor: pointer;
        }
       
        .content-display a:hover {
            color: var(--accent-color);
            border-bottom: 1px solid var(--accent-color);
        }
       
        .loading {
            text-align: center;
            padding: 40px;
            color: var(--accent-color);
        }
       
        .loading i {
            font-size: 2rem;
            margin-bottom: 15px;
         }
         }
          
          
خط ۲۶۷: خط ۲۳۴:
             gap: 8px;
             gap: 8px;
             padding: 12px 20px;
             padding: 12px 20px;
             background-color: var(--accent-color);
             background-color: #87CEEB;
             color: white;
             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;
         }
         }


خط ۳۵۳: خط ۳۳۰:
              
              
             .content-display {
             .content-display {
                 min-height: 400px;
                 height: 500px;
                max-height: 500px;
                padding: 15px;
             }
             }
              
              
خط ۳۶۹: خط ۳۴۴:
         }
         }


        @media (max-width: 480px) {
            .content-display {
                height: 450px;
            }
           
            .nav-btn, .wiki-link {
                padding: 10px 15px;
                font-size: 0.9rem;
            }
           
            .instructions {
                padding: 30px 15px;
                font-size: 1rem;
            }
           
            .app-header {
                padding: 10px 12px;
            }
           
            .app-header h1 {
                font-size: 1.3rem;
            }
        }
        /* استایل برای حالت انتخاب نشده */
         .placeholder {
         .placeholder {
             display: flex;
             display: flex;
خط ۳۸۵: خط ۳۸۵:
         }
         }


        /* استایل برای راست‌چین کامل */
         option {
         option {
             direction: rtl;
             direction: rtl;
خط ۳۹۹: خط ۴۰۰:
                 <span class="breadcrumb-current">کتاب مقدس</span>
                 <span class="breadcrumb-current">کتاب مقدس</span>
             </nav>
             </nav>
             <h1>کتاب مقدس</h1>
             <h1>کتاب مقدس آنلاین</h1>
             <p class="description">مطالعه کتاب مقدس با ترجمه‌های مختلف</p>
             <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;
             }
             }
             return ALLOWED_DOMAINS.some(domain => {
              
                 return currentDomain === domain || currentDomain.endsWith('.' + domain);
            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');
خط ۴۳۳: خط ۴۵۲:
                     <h3><i class="fas fa-ban"></i> دسترسی محدود شده</h3>
                     <h3><i class="fas fa-ban"></i> دسترسی محدود شده</h3>
                     <p>این صفحه فقط بر روی دامنه <strong>pediabible.com</strong> قابل دسترسی است.</p>
                     <p>این صفحه فقط بر روی دامنه <strong>pediabible.com</strong> قابل دسترسی است.</p>
                    <p>دامنه فعلی: <code>${window.location.hostname}</code></p>
                     <p>لطفاً از <a href="https://www.pediabible.com" style="color: #721c24; text-decoration: underline;">سایت اصلی</a> بازدید کنید.</p>
                     <p>لطفاً از <a href="https://www.pediabible.com" style="color: #721c24; text-decoration: underline;">سایت اصلی</a> بازدید کنید.</p>
                 </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: "کتاب مکاشفه " }
             ]
             ]
         };
         };
خط ۵۱۶: خط ۵۵۱:
             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': {
خط ۶۱۵: خط ۶۵۷:
             };
             };


            // عناصر 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.addEventListener('change', function() {
             bookSelect.addEventListener('change', function() {
                 currentBook = this.value;
                 currentBook = this.value;
خط ۶۹۹: خط ۷۴۶:
             });
             });


            // رویداد تغییر فصل
             chapterSelect.addEventListener('change', function() {
             chapterSelect.addEventListener('change', function() {
                 currentChapter = parseInt(this.value);
                 currentChapter = parseInt(this.value);
                  
                  
                 if (currentChapter) {
                 if (currentChapter) {
                     loadContent();
                     displayChapterWithIframe();
                 } else {
                 } else {
                     resetContent();
                     resetContent();
خط ۷۰۹: خط ۷۵۷:
             });
             });


             // تابع اصلی برای بارگذاری محتوا
             // نمایش فصل با iframe - فقط محتوای اصلی
             async function loadContent(pageTitle = null) {
             function displayChapterWithIframe() {
                let title;
                 const bookIndex = parseInt(currentBook);
                let displayTitle;
                const bookData = bibleBooks[currentTestament][bookIndex];
 
                const bookName = bookData.name;
                if (pageTitle) {
                const bookDisplayName = bookData.displayName;
                    // اگر صفحه خاصی درخواست شده (مثل اسحاق)
                const translationName = translations[currentTranslation].name;
                    title = pageTitle;
               
                    displayTitle = decodeURIComponent(pageTitle);
                chapterTitle.textContent = `${translationName} - ${bookName} - فصل ${currentChapter}`;
                 } else {
                  
                    // اگر فصل کتاب درخواست شده
                const pageTitle = translations[currentTranslation].getPageTitle(bookDisplayName, currentChapter);
                    const bookIndex = parseInt(currentBook);
                 const contentUrl = `${translations[currentTranslation].baseUrl}${encodeURIComponent(pageTitle)}&action=render`;
                    const bookData = bibleBooks[currentTestament][bookIndex];
                  
                    const bookName = bookData.name;
                    const bookDisplayName = bookData.displayName;
                    const translationName = translations[currentTranslation].name;
                   
                    title = translations[currentTranslation].getPageTitle(bookDisplayName, currentChapter);
                    displayTitle = `${translationName} - ${bookName} - فصل ${currentChapter}`;
                 }
 
                 chapterTitle.textContent = displayTitle;
 
                 // نمایش loading
                 versesContainer.innerHTML = `
                 versesContainer.innerHTML = `
                     <div class="loading">
                     <iframe
                         <i class="fas fa-spinner fa-spin"></i>
                        id="content-iframe"
                         <p>در حال بارگذاری محتوا...</p>
                        src="${contentUrl}"
                     </div>
                        class="content-display"
                        frameborder="0"
                        loading="lazy"
                         sandbox="allow-scripts allow-same-origin allow-forms allow-popups"
                         allowfullscreen>
                     </iframe>
                 `;
                 `;
                // استفاده از action=render برای دریافت فقط محتوای اصلی
                const contentUrl = `https://www.pediabible.com/index.php?title=${encodeURIComponent(title)}&action=render`;
                try {
                    const response = await fetch(contentUrl);
                    const html = await response.text();
                   
                    // پردازش HTML و استخراج فقط محتوای اصلی
                    const processedContent = processContent(html);
                   
                    // نمایش محتوا در container
                    versesContainer.innerHTML = `
                        <div class="content-display">
                            ${processedContent}
                        </div>
                    `;
                    // تنظیم event listener برای تمام لینک‌های داخلی
                    setupInternalLinks();
                } catch (error) {
                    versesContainer.innerHTML = `
                        <div class="access-denied">
                            <h3><i class="fas fa-exclamation-triangle"></i> خطا در بارگذاری</h3>
                            <p>مشکلی در بارگذاری محتوا پیش آمده است.</p>
                        </div>
                    `;
                }
                // لینک صفحه کامل
                wikiPageLink.href = `https://www.pediabible.com/index.php?title=${encodeURIComponent(title)}`;
                wikiPageLink.style.display = 'flex';
                  
                  
                if (!pageTitle) {
                 // اضافه کردن sandbox به iframe برای امنیت بیشتر
                    updateNavigationButtons();
                 const iframe = document.getElementById('content-iframe');
                }
            }
 
            // پردازش محتوا و حذف المان‌های اضافی
            function processContent(html) {
                const tempDiv = document.createElement('div');
                tempDiv.innerHTML = html;
 
                // حذف تمام المان‌های اضافی
                const elementsToRemove = tempDiv.querySelectorAll(
                    'header, nav, .mw-header, .wiki-header, .header, #header, .navigation, .nav, .mw-nav, #mw-navigation, script, style, link, meta, .mw-editsection, .reference, .references, .mw-cite-backlink'
                );
                elementsToRemove.forEach(el => el.remove());
 
                 // بهبود لینک‌ها - تبدیل به لینک‌های داخلی برنامه
                const links = tempDiv.querySelectorAll('a[href*="pediabible.com"]');
                links.forEach(link => {
                    const url = new URL(link.href);
                    const titleParam = url.searchParams.get('title');
                    if (titleParam) {
                        link.href = 'javascript:void(0)';
                        link.setAttribute('data-wiki-title', titleParam);
                        link.classList.add('internal-link');
                    }
                });
 
                return tempDiv.innerHTML;
            }
 
            // تنظیم event listener برای لینک‌های داخلی
            function setupInternalLinks() {
                 const links = versesContainer.querySelectorAll('.internal-link');
                  
                  
                 links.forEach(link => {
                 wikiPageLink.href = `${translations[currentTranslation].baseUrl}${encodeURIComponent(pageTitle)}`;
                    link.addEventListener('click', function(e) {
                wikiPageLink.style.display = 'flex';
                        e.preventDefault();
                updateNavigationButtons();
                        const title = this.getAttribute('data-wiki-title');
                       
                        if (title) {
                            // بارگذاری صفحه جدید با همان روش
                            loadContent(title);
                        }
                    });
                });
             }
             }


خط ۸۳۳: خط ۸۰۲:
                     currentChapter--;
                     currentChapter--;
                     chapterSelect.value = currentChapter;
                     chapterSelect.value = currentChapter;
                     loadContent();
                     displayChapterWithIframe();
                 }
                 }
             });
             });
خط ۸۴۴: خط ۸۱۳:
                     currentChapter++;
                     currentChapter++;
                     chapterSelect.value = currentChapter;
                     chapterSelect.value = currentChapter;
                     loadContent();
                     displayChapterWithIframe();
                 }
                 }
             });
             });
خط ۸۶۵: خط ۸۳۴:
             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() {
             if (!isDomainAllowed()) {
             console.log('🚀 شروع بارگذاری با بررسی امنیتی...');
                showAccessDenied();
            loadApplication();
                return;
        });
             }
 
             initializeBibleApp();
        // 🔒 جلوگیری از دسترسی به توابع از کنسول
        Object.defineProperty(window, 'translations', {
             value: null,
            writable: false,
             configurable: false
         });
         });
     </script>
     </script>
</body>
</body>
</html>
</html>

نسخهٔ کنونی تا ‏۱۱ اکتبر ۲۰۲۵، ساعت ۲۲:۰۹

کتاب مقدس - مطالعه آنلاین

کتاب مقدس آنلاین

مطالعه ترجمه‌های مختلف بصورت کاربردی با واژه نامه تخصصی
ترجمهٔ هزارهٔ نو و مژده هم‌اکنون قابل مطالعه‌اند و عهد جدید کامل شده است. واژه‌نامه‌ها به‌صورت روزانه و با دقت در حال اتصال و به‌روزرسانی هستند تا خدمتی ماندگار برای نسل حال و آیندگان در خداوند به‌جا بگذاریم.