پرش به محتوا

تست: تفاوت میان نسخه‌ها

از دانشنامه کتاب مقدس
بدون خلاصۀ ویرایش
بدون خلاصۀ ویرایش
خط ۱: خط ۱:
<!DOCTYPE html>
<html lang="fa" dir="rtl">
<html lang="fa" dir="rtl">
<head>
<head>
خط ۱۳۶: خط ۱۳۵:
             const wikiLink = document.getElementById('wikiLink');
             const wikiLink = document.getElementById('wikiLink');
              
              
            // ذخیره تمام آیتم‌های اصلی
             const originalOptions = Array.from(bookSelect.options);
             const originalOptions = Array.from(bookSelect.options);
              
              
            // فیلتر کردن لیست بر اساس دسته‌بندی
             function filterBooks() {
             function filterBooks() {
                 const category = categorySelect.value;
                 const category = categorySelect.value;
                  
                  
                // پاک کردن لیست فعلی
                 bookSelect.innerHTML = '';
                 bookSelect.innerHTML = '';
                  
                  
                // اضافه کردن گزینه اول
                 const firstOption = document.createElement('option');
                 const firstOption = document.createElement('option');
                 firstOption.value = "";
                 firstOption.value = "";
خط ۱۵۲: خط ۱۴۷:
                 bookSelect.appendChild(firstOption);
                 bookSelect.appendChild(firstOption);
                  
                  
                // فیلتر و اضافه کردن موارد
                 originalOptions.forEach(option => {
                 originalOptions.forEach(option => {
                     if (option.value === "") return; // گزینه اول را نادیده بگیر
                     if (option.value === "") return;
                      
                      
                     const itemCategory = option.getAttribute('data-category');
                     const itemCategory = option.getAttribute('data-category');
خط ۱۶۳: خط ۱۵۷:
             }
             }
              
              
            // نمایش کتاب در iframe
             function showBook(bookValue, bookText) {
             function showBook(bookValue, bookText) {
                 if (!bookValue) {
                 if (!bookValue) {
خط ۱۷۱: خط ۱۶۴:
                 }
                 }
                  
                  
                 // ساخت آدرس صحیح: https://www.pediabible.com/index.php/نام_صفحه
                 // استفاده از action=render برای محتوای تمیز
                 const cleanContentUrl = `https://www.pediabible.com/index.php/${bookValue}`;
                 const cleanContentUrl = `https://www.pediabible.com/index.php/${bookValue}?action=render`;
                 const wikiPageUrl = `https://www.pediabible.com/index.php/${bookValue}`;
                 const wikiPageUrl = `https://www.pediabible.com/index.php/${bookValue}`;
                  
                  
                 console.log('در حال بارگذاری آدرس:', cleanContentUrl);
                 console.log('در حال بارگذاری آدرس:', cleanContentUrl);
                  
                  
                 // نمایش محتوا در iframe
                 // استفاده از iframe با action=render
                 contentFrame.src = cleanContentUrl;
                 contentFrame.src = cleanContentUrl;
                  
                  
                // به‌روزرسانی لینک ویکی
                 wikiLink.href = wikiPageUrl;
                 wikiLink.href = wikiPageUrl;
                 wikiLink.textContent = `📖 مطالعه کامل "${bookText}" در ویکی`;
                 wikiLink.textContent = `📖 مطالعه کامل "${bookText}" در ویکی`;
خط ۱۸۶: خط ۱۷۸:
             }
             }
              
              
            // رویدادها
             categorySelect.addEventListener('change', filterBooks);
             categorySelect.addEventListener('change', filterBooks);
              
              
خط ۱۹۸: خط ۱۸۹:
             });
             });
              
              
            // بارگذاری اولیه
             filterBooks();
             filterBooks();
              
              
            // نمایش اولین مورد به صورت پیش‌فرض پس از لود صفحه
             setTimeout(() => {
             setTimeout(() => {
                 if (bookSelect.options.length > 1) {
                 if (bookSelect.options.length > 1) {

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

کتابخانه - پدیا بایبل

کتابخانه پدیا بایبل