پرش به محتوا

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

از دانشنامه کتاب مقدس
بدون خلاصۀ ویرایش
برچسب: برگردانده‌شده
بدون خلاصۀ ویرایش
برچسب: برگردانده‌شده
خط ۲۰: خط ۲۰:
             padding: 0;
             padding: 0;
             box-sizing: border-box;
             box-sizing: border-box;
        }
       
        html, body {
            height: 100%;
            width: 100%;
            overflow: hidden;
         }
         }
          
          
خط ۳۴: خط ۲۸:
             line-height: 1.6;
             line-height: 1.6;
             background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" opacity="0.05"><path fill="%238B4513" d="M20,20 L80,20 L80,80 L20,80 Z" stroke="%238B4513" stroke-width="2"/></svg>');
             background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" opacity="0.05"><path fill="%238B4513" d="M20,20 L80,20 L80,80 L20,80 Z" stroke="%238B4513" stroke-width="2"/></svg>');
             padding: 0;
             padding: 10px;
            margin: 0;
            display: flex;
            flex-direction: column;
        }
       
        /* مخفی کردن هدرهای اضافی ویکی */
        body > header:first-child,
        .wiki-header,
        .mw-header,
        #mw-header,
        #header,
        .header {
            display: none !important;
         }
         }
          
          
         .container {
         .container {
             width: 100%;
             max-width: 1200px;
            height: 100vh;
             margin: 0 auto;
             margin: 0;
            padding: 8px 12px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
         }
         }
          
          
         .app-header {
         .app-header {
             text-align: center;
             text-align: center;
             margin-bottom: 10px;
             margin-bottom: 20px;
             padding: 10px 12px;
             padding: 15px;
             border-bottom: 2px solid var(--border-color);
             border-bottom: 2px solid var(--border-color);
             background: linear-gradient(to bottom, #f9f6f2, #f0e6d6);
             background: linear-gradient(to bottom, #f9f6f2, #f0e6d6);
             border-radius: 8px;
             border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            flex-shrink: 0;
        }
       
        .breadcrumb {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 6px;
            margin-bottom: 6px;
            font-size: 0.9rem;
            color: var(--dark-color);
            direction: rtl;
        }
       
        .breadcrumb-home {
            color: var(--accent-color);
            text-decoration: none;
            transition: color 0.3s;
            font-weight: 500;
        }
       
        .breadcrumb-home:hover {
            color: var(--primary-color);
            text-decoration: underline;
        }
       
        .breadcrumb-separator {
            color: var(--border-color);
            font-weight: 300;
        }
       
        .breadcrumb-current {
            color: var(--primary-color);
            font-weight: bold;
         }
         }
          
          
         .app-header h1 {
         .app-header h1 {
             color: var(--primary-color);
             color: var(--primary-color);
             margin-bottom: 4px;
             margin-bottom: 5px;
             font-size: 1.3rem;
             font-size: 1.8rem;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
            font-weight: 700;
            text-align: center;
         }
         }
          
          
         .description {
         .description {
             color:#808080;
             color:#808080;
             font-size:0.9rem;
             font-size:1.1rem;
             font-style: italic;
             font-style: italic;
            text-align: center;
         }
         }
          
          
خط ۱۲۳: خط ۶۰:
             display: grid;
             display: grid;
             grid-template-columns: 1fr 1fr;
             grid-template-columns: 1fr 1fr;
             gap: 10px;
             gap: 15px;
             margin-bottom: 10px;
             margin-bottom: 20px;
             background: white;
             background: white;
             padding: 10px;
             padding: 15px;
             border-radius: 8px;
             border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.08);
             border: 1px solid var(--border-color);
             border: 1px solid var(--border-color);
            direction: rtl;
            text-align: right;
            flex-shrink: 0;
         }
         }
          
          
خط ۱۳۸: خط ۷۱:
             background: white;
             background: white;
             border-radius: 6px;
             border-radius: 6px;
             padding: 8px;
             padding: 10px;
            border: 1px solid var(--border-color);
         }
         }
          
          
         .selector-title {
         .selector-title {
             font-size: 0.85rem;
             font-size: 0.9rem;
             margin-bottom: 5px;
             margin-bottom: 8px;
             color: var(--primary-color);
             color: var(--primary-color);
             border-bottom: 1px solid var(--border-color);
             border-bottom: 1px solid var(--border-color);
             padding-bottom: 3px;
             padding-bottom: 5px;
             text-align: center;
             text-align: center;
         }
         }
خط ۱۵۳: خط ۸۵:
         select {
         select {
             width: 100%;
             width: 100%;
             padding: 6px 8px;
             padding: 8px;
             border: 1px solid var(--border-color);
             border: 1px solid var(--border-color);
             border-radius: 4px;
             border-radius: 4px;
             background-color: white;
             background-color: white;
             font-size: 0.85rem;
             font-size: 0.9rem;
            color: var(--dark-color);
            cursor: pointer;
            transition: all 0.3s;
            font-family: var(--font-family);
            text-align: right;
            direction: rtl;
        }
       
        select:focus {
            outline: none;
            border-color: var(--accent-color);
            box-shadow: 0 0 0 2px rgba(165, 42, 42, 0.2);
         }
         }
          
          
خط ۱۷۵: خط ۹۵:
             background: white;
             background: white;
             border-radius: 8px;
             border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
             padding: 20px;
             padding: 12px;
            flex: 1;
             border: 1px solid var(--border-color);
             border: 1px solid var(--border-color);
             margin-bottom: 10px;
             margin-bottom: 20px;
            direction: rtl;
            text-align: right;
            display: flex;
            flex-direction: column;
            min-height: 0;
            overflow: hidden;
         }
         }
          
          
         .chapter-title {
         .chapter-title {
             text-align: center;
             text-align: center;
             margin-bottom: 10px;
             margin-bottom: 15px;
             color: var(--primary-color);
             color: var(--primary-color);
             font-size: 1.1rem;
             font-size: 1.3rem;
             padding-bottom: 6px;
             padding-bottom: 10px;
             border-bottom: 2px solid var(--border-color);
             border-bottom: 2px solid var(--border-color);
            flex-shrink: 0;
        }
       
        #verses-container {
            flex: 1;
            min-height: 0;
            display: flex;
            flex-direction: column;
            overflow: hidden;
         }
         }
          
          
         .content-display {
         .content-display {
             width: 100%;
             width: 100%;
             height: 100%;
             height: 500px;
             border: 1px solid var(--border-color);
             border: 1px solid var(--border-color);
             border-radius: 6px;
             border-radius: 6px;
            background: white;
            min-height: 0;
            flex: 1;
         }
         }
          
          
خط ۲۲۰: خط ۱۲۰:
             justify-content: space-between;
             justify-content: space-between;
             align-items: center;
             align-items: center;
             margin-top: 12px;
             margin-top: 20px;
            flex-wrap: wrap;
            gap: 6px;
            direction: rtl;
            flex-shrink: 0;
         }
         }
          
          
         .nav-btn {
         .nav-btn {
             padding: 8px 12px;
             padding: 10px 20px;
             background-color: var(--secondary-color);
             background-color: var(--secondary-color);
             color: white;
             color: white;
خط ۲۳۴: خط ۱۳۰:
             border-radius: 6px;
             border-radius: 6px;
             cursor: pointer;
             cursor: pointer;
            transition: all 0.3s;
            font-size: 0.85rem;
             display: flex;
             display: flex;
             align-items: center;
             align-items: center;
             gap: 4px;
             gap: 8px;
            font-family: var(--font-family);
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }
       
        .nav-btn:hover {
            background-color: var(--accent-color);
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
         }
         }
          
          
خط ۲۵۲: خط ۱۳۸:
             background-color: #b0a090;
             background-color: #b0a090;
             cursor: not-allowed;
             cursor: not-allowed;
            transform: none;
            box-shadow: none;
         }
         }


خط ۲۵۹: خط ۱۴۳:
             display: inline-flex;
             display: inline-flex;
             align-items: center;
             align-items: center;
            justify-content: center;
             gap: 8px;
             gap: 4px;
             padding: 10px 20px;
             padding: 8px 12px;
             background-color: #87CEEB;
             background-color: #87CEEB;
             color: #000000;
             color: #000000;
             text-decoration: none;
             text-decoration: none;
             border-radius: 6px;
             border-radius: 6px;
            transition: all 0.3s;
            font-size: 0.85rem;
            font-family: var(--font-family);
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }
        .wiki-link:hover {
            background-color: #8B0000;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
         }
         }


خط ۲۸۱: خط ۱۵۴:
             text-align: center;
             text-align: center;
             color: #7f8c8d;
             color: #7f8c8d;
             padding: 20px 12px;
             padding: 40px 20px;
             border: 2px dashed var(--border-color);
             border: 2px dashed var(--border-color);
             border-radius: 8px;
             border-radius: 8px;
             font-size: 0.9rem;
             font-size: 1.1rem;
             background-color: var(--light-color);
             background-color: var(--light-color);
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
         }
         }


         .access-denied {
         .placeholder {
            text-align: center;
            padding: 20px;
            background: #fee;
            border-radius: 8px;
            border: 2px solid #f5c6cb;
            color: #721c24;
            flex: 1;
             display: flex;
             display: flex;
             flex-direction: column;
             flex-direction: column;
            align-items: center;
             justify-content: center;
             justify-content: center;
            height: 100%;
         }
         }


         .access-denied h3 {
         .placeholder i {
             color: #721c24;
             font-size: 3rem;
             margin-bottom: 10px;
             margin-bottom: 15px;
             font-size: 1.1rem;
             color: var(--border-color);
         }
         }


        .info-message {
            text-align: center;
            padding: 6px;
            background: #e7f3ff;
            border-radius: 5px;
            margin-top: 6px;
            font-size: 0.8rem;
            color: #0066cc;
            flex-shrink: 0;
        }
        /* استایل‌های مخصوص موبایل */
         @media (max-width: 768px) {
         @media (max-width: 768px) {
            .container {
                padding: 5px 8px;
            }
           
            .app-header {
                margin-bottom: 8px;
                padding: 8px 10px;
            }
           
            .breadcrumb {
                font-size: 0.8rem;
                margin-bottom: 4px;
            }
           
            .app-header h1 {
                font-size: 1.1rem;
                margin-bottom: 3px;
            }
           
            .description {
                font-size: 0.8rem;
            }
           
             .selector-container {
             .selector-container {
                 grid-template-columns: 1fr;
                 grid-template-columns: 1fr;
                gap: 6px;
                margin-bottom: 8px;
                padding: 8px;
            }
           
            .bible-content {
                padding: 10px;
            }
           
            .chapter-title {
                font-size: 1rem;
                margin-bottom: 8px;
             }
             }
              
              
             .navigation {
             .navigation {
                 flex-direction: column;
                 flex-direction: column;
                 gap: 6px;
                 gap: 10px;
             }
             }
              
              
خط ۳۷۲: خط ۱۸۹:
                 justify-content: center;
                 justify-content: center;
             }
             }
        }
        /* استایل برای حالت انتخاب نشده */
        .placeholder {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
            color: #7f8c8d;
            text-align: center;
        }
        .placeholder i {
            font-size: 2rem;
            margin-bottom: 10px;
            color: var(--border-color);
        }
        /* استایل برای راست‌چین کامل */
        option {
            direction: rtl;
            text-align: right;
         }
         }
     </style>
     </style>
خط ۴۰۱: خط ۱۹۵:
     <div class="container">
     <div class="container">
         <div class="app-header">
         <div class="app-header">
            <nav class="breadcrumb">
                <a href="https://www.pediabible.com" class="breadcrumb-home">خانه</a>
                <span class="breadcrumb-separator">/</span>
                <span class="breadcrumb-current">کتاب مقدس</span>
            </nav>
             <h1>کتاب مقدس آنلاین</h1>
             <h1>کتاب مقدس آنلاین</h1>
             <p class="description">مطالعه ترجمه‌های مختلف بصورت کاربردی با واژه نامه تخصصی</p>
             <p class="description">مطالعه ترجمه‌های مختلف بصورت کاربردی با واژه نامه تخصصی</p>
         </div>
         </div>
          
          
         <div id="content-wrapper" style="flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden;">
         <div class="selector-container">
            <!-- محتوا توسط JavaScript پر می‌شود -->
            <div class="selector-box">
                <h3 class="selector-title">ترجمه</h3>
                <select id="translation-select">
                    <option value="">انتخاب ترجمه</option>
                    <option value="old">ترجمه قدیم</option>
                    <option value="hejre_nou">هزاره نو</option>
                    <option value="mozde">مژده</option>
                    <option value="daneshname">دانشنامه</option>
                </select>
            </div>
           
            <div class="selector-box">
                <h3 class="selector-title">عهد</h3>
                <select id="testament-select" disabled>
                    <option value="">انتخاب عهد</option>
                    <option value="old">عهد قدیم</option>
                    <option value="new">عهد جدید</option>
                </select>
            </div>
           
            <div class="selector-box">
                <h3 class="selector-title">کتاب</h3>
                <select id="book-select" disabled>
                    <option value="">انتخاب کتاب</option>
                </select>
            </div>
           
            <div class="selector-box">
                <h3 class="selector-title">فصل</h3>
                <select id="chapter-select" disabled>
                    <option value="">انتخاب فصل</option>
                </select>
            </div>
        </div>
       
        <div class="bible-content">
            <h2 class="chapter-title" id="chapter-title">لطفاً ترجمه، کتاب و فصل مورد نظر را انتخاب کنید</h2>
           
            <div id="verses-container">
                <div class="instructions">
                    <div class="placeholder">
                        <i class="fas fa-book-open"></i>
                        <p>برای مطالعه کتاب مقدس، لطفاً ابتدا ترجمه، سپس عهد، کتاب و فصل مورد نظر خود را انتخاب کنید.</p>
                    </div>
                </div>
            </div>
           
            <div class="navigation">
                <button class="nav-btn" id="prev-chapter" disabled>
                    <i class="fas fa-arrow-right"></i>
                    فصل قبلی
                </button>
               
                <a href="#" class="wiki-link" id="wiki-page-link" target="_blank" style="display: none;">
                    <i class="fas fa-external-link-alt"></i>
                    صفحه کامل
                </a>
               
                <button class="nav-btn" id="next-chapter" disabled>
                    فصل بعدی
                    <i class="fas fa-arrow-left"></i>
                </button>
            </div>
         </div>
         </div>
     </div>
     </div>


     <script>
     <script>
        // 🔒 سیستم حفاظتی - بررسی دامنه مجاز
        const ALLOWED_DOMAINS = [
            'pediabible.com',
            'www.pediabible.com',
            'localhost',
            '127.0.0.1'
        ];
        // تابع بررسی مجاز بودن دامنه
        function isDomainAllowed() {
            const currentDomain = window.location.hostname;
           
            // اگر روی فایل محلی هستیم، اجازه بده
            if (!currentDomain || currentDomain === '' || currentDomain === 'null') {
                return true;
            }
           
            return ALLOWED_DOMAINS.some(domain => {
                return currentDomain === domain || currentDomain.endsWith('.' + domain);
            });
        }
        // تابع نمایش پیام دسترسی غیرمجاز
        function showAccessDenied() {
            const wrapper = document.getElementById('content-wrapper');
            wrapper.innerHTML = `
                <div class="access-denied">
                    <h3><i class="fas fa-ban"></i> دسترسی محدود شده</h3>
                    <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>
                </div>
            `;
        }
        // تابع اصلی بارگذاری برنامه
        function loadApplication() {
            if (!isDomainAllowed()) {
                showAccessDenied();
                return;
            }
            initializeBibleApp();
        }
         // داده‌های کامل کتاب‌های مقدس
         // داده‌های کامل کتاب‌های مقدس
         const bibleBooks = {
         const bibleBooks = {
خط ۵۳۴: خط ۳۴۱:
         };
         };


         // 🔧 برنامه اصلی کتاب مقدس
         // داده‌های ترجمه‌های مختلف
        function initializeBibleApp() {
        const translations = {
            const wrapper = document.getElementById('content-wrapper');
            'old': {
           
                name: 'ترجمه قدیم',
            // ایجاد ساختار HTML برنامه
                baseUrl: 'https://www.pediabible.com/index.php?title=',
            wrapper.innerHTML = `
                getPageTitle: function(bookDisplayName, chapter) {
                <div class="selector-container">
                    return `${bookDisplayName} فصل ${chapter}`;
                    <div class="selector-box">
                }
                        <h3 class="selector-title">ترجمه</h3>
            },
                        <select id="translation-select">
            'hejre_nou': {
                            <option value="">انتخاب ترجمه</option>
                name: 'هزاره نو',
                            <option value="old">ترجمه قدیم</option>
                baseUrl: 'https://www.pediabible.com/index.php?title=',
                            <option value="hejre_nou">هزاره نو</option>
                getPageTitle: function(bookDisplayName, chapter) {
                            <option value="mozde">مژده</option>
                    return `${bookDisplayName} هزاره نو فصل ${chapter}`;
                            <option value="daneshname">دانشنامه</option>
                }
                        </select>
            },
                    </div>
            'mozde': {
                   
                name: 'مژده',
                    <div class="selector-box">
                baseUrl: 'https://www.pediabible.com/index.php?title=',
                        <h3 class="selector-title">عهد</h3>
                getPageTitle: function(bookDisplayName, chapter) {
                        <select id="testament-select" disabled>
                    return `${bookDisplayName} مژده فصل ${chapter}`;
                            <option value="">انتخاب عهد</option>
                            <option value="old">عهد قدیم</option>
                            <option value="new">عهد جدید</option>
                        </select>
                    </div>
                   
                    <div class="selector-box">
                        <h3 class="selector-title">کتاب</h3>
                        <select id="book-select" disabled>
                            <option value="">انتخاب کتاب</option>
                        </select>
                    </div>
                   
                    <div class="selector-box">
                        <h3 class="selector-title">فصل</h3>
                        <select id="chapter-select" disabled>
                            <option value="">انتخاب فصل</option>
                        </select>
                    </div>
                </div>
               
                <div class="bible-content">
                    <h2 class="chapter-title" id="chapter-title">لطفاً ترجمه، کتاب و فصل مورد نظر را انتخاب کنید</h2>
                   
                    <div id="verses-container">
                        <div class="instructions">
                            <div class="placeholder">
                                <i class="fas fa-book-open"></i>
                                <p>برای مطالعه کتاب مقدس، لطفاً ابتدا ترجمه، سپس عهد، کتاب و فصل مورد نظر خود را انتخاب کنید.</p>
                            </div>
                        </div>
                    </div>
                   
                    <div class="info-message">
                        <i class="fas fa-info-circle"></i>
                        واژه ها در همین پنجره نمایش داده می‌شوند. برای تجربه بهتر مطالعه واژه در تب جدید: راست کلیک → Open in new tab
                    </div>
                   
                    <div class="navigation">
                        <button class="nav-btn" id="prev-chapter" disabled>
                            <i class="fas fa-arrow-right"></i>
                            فصل قبلی
                        </button>
                       
                        <a href="#" class="wiki-link" id="wiki-page-link" target="_blank" style="display: none;">
                            <i class="fas fa-external-link-alt"></i>
                            صفحه کامل
                        </a>
                       
                        <button class="nav-btn" id="next-chapter" disabled>
                            فصل بعدی
                            <i class="fas fa-arrow-left"></i>
                        </button>
                    </div>
                </div>
            `;
 
            // داده‌های ترجمه‌های مختلف
            const translations = {
                'old': {
                    name: 'ترجمه قدیم',
                    baseUrl: 'https://www.pediabible.com/index.php?title=',
                    getPageTitle: function(bookDisplayName, chapter) {
                        return `${bookDisplayName} فصل ${chapter}`;
                    }
                },
                'hejre_nou': {
                    name: 'هزاره نو',
                    baseUrl: 'https://www.pediabible.com/index.php?title=',
                    getPageTitle: function(bookDisplayName, chapter) {
                        return `${bookDisplayName} هزاره نو فصل ${chapter}`;
                    }
                },
                'mozde': {
                    name: 'مژده',
                    baseUrl: 'https://www.pediabible.com/index.php?title=',
                    getPageTitle: function(bookDisplayName, chapter) {
                        return `${bookDisplayName} مژده فصل ${chapter}`;
                    }
                },
                'daneshname': {
                    name: 'دانشنامه',
                    baseUrl: 'https://www.pediabible.com/index.php?title=',
                    getPageTitle: function(bookDisplayName, chapter) {
                        return `${bookDisplayName} دانشنامه فصل ${chapter}`;
                    }
                 }
                 }
             };
             },
 
             'daneshname': {
            // عناصر DOM
                name: 'دانشنامه',
             const translationSelect = document.getElementById('translation-select');
                baseUrl: 'https://www.pediabible.com/index.php?title=',
            const testamentSelect = document.getElementById('testament-select');
                 getPageTitle: function(bookDisplayName, chapter) {
            const bookSelect = document.getElementById('book-select');
                     return `${bookDisplayName} دانشنامه فصل ${chapter}`;
            const chapterSelect = document.getElementById('chapter-select');
            const chapterTitle = document.getElementById('chapter-title');
            const versesContainer = document.getElementById('verses-container');
            const prevChapterBtn = document.getElementById('prev-chapter');
            const nextChapterBtn = document.getElementById('next-chapter');
            const wikiPageLink = document.getElementById('wiki-page-link');
 
            // متغیرهای وضعیت فعلی
            let currentTranslation = '';
            let currentTestament = '';
            let currentBook = '';
            let currentChapter = 1;
 
            // رویداد تغییر ترجمه
            translationSelect.addEventListener('change', function() {
                 currentTranslation = this.value;
               
                if (currentTranslation) {
                     testamentSelect.disabled = false;
                    testamentSelect.value = '';
                    bookSelect.disabled = true;
                    bookSelect.innerHTML = '<option value="">انتخاب کتاب</option>';
                    chapterSelect.disabled = true;
                    chapterSelect.innerHTML = '<option value="">انتخاب فصل</option>';
                    resetContent();
                } else {
                    resetAll();
                 }
                 }
             });
             }
        };


            // رویداد تغییر عهد
        // عناصر DOM
            testamentSelect.addEventListener('change', function() {
        const translationSelect = document.getElementById('translation-select');
                currentTestament = this.value;
        const testamentSelect = document.getElementById('testament-select');
               
        const bookSelect = document.getElementById('book-select');
                if (currentTestament) {
        const chapterSelect = document.getElementById('chapter-select');
                    bookSelect.disabled = false;
        const chapterTitle = document.getElementById('chapter-title');
                    bookSelect.innerHTML = '<option value="">انتخاب کتاب</option>';
        const versesContainer = document.getElementById('verses-container');
                   
        const prevChapterBtn = document.getElementById('prev-chapter');
                    bibleBooks[currentTestament].forEach((book, index) => {
        const nextChapterBtn = document.getElementById('next-chapter');
                        const option = document.createElement('option');
        const wikiPageLink = document.getElementById('wiki-page-link');
                        option.value = index;
                        option.textContent = book.name;
                        bookSelect.appendChild(option);
                    });
                   
                    chapterSelect.disabled = true;
                    chapterSelect.innerHTML = '<option value="">انتخاب فصل</option>';
                    resetContent();
                } else {
                    bookSelect.disabled = true;
                    bookSelect.innerHTML = '<option value="">انتخاب کتاب</option>';
                    chapterSelect.disabled = true;
                    chapterSelect.innerHTML = '<option value="">انتخاب فصل</option>';
                    resetContent();
                }
            });


            // رویداد تغییر کتاب
        // متغیرهای وضعیت فعلی
            bookSelect.addEventListener('change', function() {
        let currentTranslation = '';
                currentBook = this.value;
        let currentTestament = '';
               
        let currentBook = '';
                if (currentBook !== '') {
        let currentChapter = 1;
                    chapterSelect.disabled = false;
                    chapterSelect.innerHTML = '<option value="">انتخاب فصل</option>';
                   
                    const bookIndex = parseInt(currentBook);
                    const chaptersCount = bibleBooks[currentTestament][bookIndex].chapters;
                   
                    for (let i = 1; i <= chaptersCount; i++) {
                        const option = document.createElement('option');
                        option.value = i;
                        option.textContent = `فصل ${i}`;
                        chapterSelect.appendChild(option);
                    }
                   
                    prevChapterBtn.disabled = true;
                    nextChapterBtn.disabled = true;
                    wikiPageLink.style.display = 'none';
                } else {
                    chapterSelect.disabled = true;
                    chapterSelect.innerHTML = '<option value="">انتخاب فصل</option>';
                    resetContent();
                }
            });


            // رویداد تغییر فصل
        // رویداد تغییر ترجمه
            chapterSelect.addEventListener('change', function() {
        translationSelect.addEventListener('change', function() {
                currentChapter = parseInt(this.value);
            currentTranslation = this.value;
               
           
                if (currentChapter) {
            if (currentTranslation) {
                    displayChapterWithIframe();
                testamentSelect.disabled = false;
                } else {
                testamentSelect.value = '';
                    resetContent();
                bookSelect.disabled = true;
                }
                bookSelect.innerHTML = '<option value="">انتخاب کتاب</option>';
            });
                chapterSelect.disabled = true;
                chapterSelect.innerHTML = '<option value="">انتخاب فصل</option>';
                resetContent();
            } else {
                resetAll();
            }
        });


            // نمایش فصل با iframe - فقط محتوای اصلی
        // رویداد تغییر عهد
            function displayChapterWithIframe() {
        testamentSelect.addEventListener('change', function() {
                const bookIndex = parseInt(currentBook);
            currentTestament = this.value;
                 const bookData = bibleBooks[currentTestament][bookIndex];
           
                 const bookName = bookData.name;
            if (currentTestament) {
                const bookDisplayName = bookData.displayName;
                 bookSelect.disabled = false;
                const translationName = translations[currentTranslation].name;
                 bookSelect.innerHTML = '<option value="">انتخاب کتاب</option>';
                  
                  
                 chapterTitle.textContent = `${translationName} - ${bookName} - فصل ${currentChapter}`;
                 bibleBooks[currentTestament].forEach((book, index) => {
                    const option = document.createElement('option');
                    option.value = index;
                    option.textContent = book.name;
                    bookSelect.appendChild(option);
                });
                  
                  
                 const pageTitle = translations[currentTranslation].getPageTitle(bookDisplayName, currentChapter);
                 chapterSelect.disabled = true;
                const contentUrl = `${translations[currentTranslation].baseUrl}${encodeURIComponent(pageTitle)}&action=render`;
                 chapterSelect.innerHTML = '<option value="">انتخاب فصل</option>';
                  
                resetContent();
                versesContainer.innerHTML = `
            } else {
                    <iframe
                bookSelect.disabled = true;
                        id="content-iframe"
                bookSelect.innerHTML = '<option value="">انتخاب کتاب</option>';
                        src="${contentUrl}"
                 chapterSelect.disabled = true;
                        class="content-display"
                 chapterSelect.innerHTML = '<option value="">انتخاب فصل</option>';
                        frameborder="0"
                 resetContent();
                        loading="lazy"
                        sandbox="allow-scripts allow-same-origin allow-forms allow-popups"
                        allowfullscreen>
                    </iframe>
                `;
                  
                wikiPageLink.href = `${translations[currentTranslation].baseUrl}${encodeURIComponent(pageTitle)}`;
                 wikiPageLink.style.display = 'flex';
                 updateNavigationButtons();
             }
             }
        });


             function updateNavigationButtons() {
        // رویداد تغییر کتاب
        bookSelect.addEventListener('change', function() {
            currentBook = this.value;
           
             if (currentBook !== '') {
                chapterSelect.disabled = false;
                chapterSelect.innerHTML = '<option value="">انتخاب فصل</option>';
               
                 const bookIndex = parseInt(currentBook);
                 const bookIndex = parseInt(currentBook);
                 const chaptersCount = bibleBooks[currentTestament][bookIndex].chapters;
                 const chaptersCount = bibleBooks[currentTestament][bookIndex].chapters;
                  
                  
                 prevChapterBtn.disabled = currentChapter <= 1;
                 for (let i = 1; i <= chaptersCount; i++) {
                nextChapterBtn.disabled = currentChapter >= chaptersCount;
                    const option = document.createElement('option');
            }
                     option.value = i;
 
                     option.textContent = `فصل ${i}`;
            prevChapterBtn.addEventListener('click', function() {
                     chapterSelect.appendChild(option);
                if (currentChapter > 1) {
                     currentChapter--;
                     chapterSelect.value = currentChapter;
                     displayChapterWithIframe();
                 }
                 }
            });
            nextChapterBtn.addEventListener('click', function() {
                const bookIndex = parseInt(currentBook);
                const chaptersCount = bibleBooks[currentTestament][bookIndex].chapters;
                  
                  
                if (currentChapter < chaptersCount) {
                    currentChapter++;
                    chapterSelect.value = currentChapter;
                    displayChapterWithIframe();
                }
            });
            function resetContent() {
                chapterTitle.textContent = 'لطفاً ترجمه، کتاب و فصل مورد نظر را انتخاب کنید';
                versesContainer.innerHTML = `
                    <div class="instructions">
                        <div class="placeholder">
                            <i class="fas fa-book-open"></i>
                            <p>برای مطالعه کتاب مقدس، لطفاً ابتدا ترجمه، سپس عهد، کتاب و فصل مورد نظر خود را انتخاب کنید.</p>
                        </div>
                    </div>
                `;
                 prevChapterBtn.disabled = true;
                 prevChapterBtn.disabled = true;
                 nextChapterBtn.disabled = true;
                 nextChapterBtn.disabled = true;
                 wikiPageLink.style.display = 'none';
                 wikiPageLink.style.display = 'none';
            } else {
                chapterSelect.disabled = true;
                chapterSelect.innerHTML = '<option value="">انتخاب فصل</option>';
                resetContent();
             }
             }
        });


            function resetAll() {
        // رویداد تغییر فصل
                testamentSelect.disabled = true;
        chapterSelect.addEventListener('change', function() {
                testamentSelect.innerHTML = '<option value="">انتخاب عهد</option>';
            currentChapter = parseInt(this.value);
                bookSelect.disabled = true;
           
                bookSelect.innerHTML = '<option value="">انتخاب کتاب</option>';
            if (currentChapter) {
                 chapterSelect.disabled = true;
                 displayChapterWithIframe();
                chapterSelect.innerHTML = '<option value="">انتخاب فصل</option>';
            } else {
                 resetContent();
                 resetContent();
             }
             }
        });
        // نمایش فصل با iframe
        function displayChapterWithIframe() {
            const bookIndex = parseInt(currentBook);
            const bookData = bibleBooks[currentTestament][bookIndex];
            const bookName = bookData.name;
            const bookDisplayName = bookData.displayName;
            const translationName = translations[currentTranslation].name;
           
            chapterTitle.textContent = `${translationName} - ${bookName} - فصل ${currentChapter}`;
           
            const pageTitle = translations[currentTranslation].getPageTitle(bookDisplayName, currentChapter);
            const contentUrl = `${translations[currentTranslation].baseUrl}${encodeURIComponent(pageTitle)}&action=render`;
           
            versesContainer.innerHTML = `
                <iframe
                    id="content-iframe"
                    src="${contentUrl}"
                    class="content-display"
                    frameborder="0"
                    loading="lazy">
                </iframe>
            `;
           
            wikiPageLink.href = `${translations[currentTranslation].baseUrl}${encodeURIComponent(pageTitle)}`;
            wikiPageLink.style.display = 'flex';
            updateNavigationButtons();
        }
        function updateNavigationButtons() {
            const bookIndex = parseInt(currentBook);
            const chaptersCount = bibleBooks[currentTestament][bookIndex].chapters;
           
            prevChapterBtn.disabled = currentChapter <= 1;
            nextChapterBtn.disabled = currentChapter >= chaptersCount;
         }
         }


         // 🔒 شروع برنامه با بررسی امنیتی
         prevChapterBtn.addEventListener('click', function() {
        document.addEventListener('DOMContentLoaded', function() {
             if (currentChapter > 1) {
             loadApplication();
                currentChapter--;
                chapterSelect.value = currentChapter;
                displayChapterWithIframe();
            }
         });
         });


         // 🔒 جلوگیری از دسترسی به توابع از کنسول
         nextChapterBtn.addEventListener('click', function() {
        Object.defineProperty(window, 'translations', {
             const bookIndex = parseInt(currentBook);
             value: null,
            const chaptersCount = bibleBooks[currentTestament][bookIndex].chapters;
            writable: false,
           
             configurable: false
            if (currentChapter < chaptersCount) {
                currentChapter++;
                chapterSelect.value = currentChapter;
                displayChapterWithIframe();
             }
         });
         });
        function resetContent() {
            chapterTitle.textContent = 'لطفاً ترجمه، کتاب و فصل مورد نظر را انتخاب کنید';
            versesContainer.innerHTML = `
                <div class="instructions">
                    <div class="placeholder">
                        <i class="fas fa-book-open"></i>
                        <p>برای مطالعه کتاب مقدس، لطفاً ابتدا ترجمه، سپس عهد، کتاب و فصل مورد نظر خود را انتخاب کنید.</p>
                    </div>
                </div>
            `;
            prevChapterBtn.disabled = true;
            nextChapterBtn.disabled = true;
            wikiPageLink.style.display = 'none';
        }
        function resetAll() {
            testamentSelect.disabled = true;
            testamentSelect.innerHTML = '<option value="">انتخاب عهد</option>';
            bookSelect.disabled = true;
            bookSelect.innerHTML = '<option value="">انتخاب کتاب</option>';
            chapterSelect.disabled = true;
            chapterSelect.innerHTML = '<option value="">انتخاب فصل</option>';
            resetContent();
        }
     </script>
     </script>
</body>
</body>
</html>
</html>

نسخهٔ ‏۱۰ اکتبر ۲۰۲۵، ساعت ۰۶:۳۵

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

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

مطالعه ترجمه‌های مختلف بصورت کاربردی با واژه نامه تخصصی

ترجمه

عهد

کتاب

فصل

لطفاً ترجمه، کتاب و فصل مورد نظر را انتخاب کنید

برای مطالعه کتاب مقدس، لطفاً ابتدا ترجمه، سپس عهد، کتاب و فصل مورد نظر خود را انتخاب کنید.