کتاب مقدس آنلاین: تفاوت میان نسخهها
ظاهر
	
	
| بدون خلاصۀ ویرایش برچسب: واگردانی دستی | بدون خلاصۀ ویرایش | ||
| خط ۴۴۵: | خط ۴۴۵: | ||
|                  </div> |                  </div> | ||
|              `; |              `; | ||
|         } | |||
|         // تابع برای اضافه کردن target="_blank" به تمام لینکهای داخل iframe | |||
|         function addTargetBlankToIframeLinks() { | |||
|             const iframe = document.getElementById('content-iframe'); | |||
|             if (!iframe) return; | |||
|             iframe.addEventListener('load', function() { | |||
|                 try { | |||
|                     const iframeDoc = iframe.contentDocument || iframe.contentWindow.document; | |||
|                     const links = iframeDoc.querySelectorAll('a'); | |||
|                     links.forEach(link => { | |||
|                         if (link.href && !link.href.includes('pediabible.com')) { | |||
|                             link.setAttribute('target', '_blank'); | |||
|                             link.setAttribute('rel', 'noopener noreferrer'); | |||
|                         } | |||
|                     }); | |||
|                     console.log(`✅ ${links.length} لینک پردازش شد`); | |||
|                 } catch (error) { | |||
|                     console.log('⚠️ امکان دسترسی به محتوای iframe وجود ندارد'); | |||
|                 } | |||
|             }); | |||
|          } |          } | ||
| خط ۷۷۳: | خط ۷۹۷: | ||
|                  wikiPageLink.href = `${translations[currentTranslation].baseUrl}${encodeURIComponent(pageTitle)}`; |                  wikiPageLink.href = `${translations[currentTranslation].baseUrl}${encodeURIComponent(pageTitle)}`; | ||
|                  wikiPageLink.style.display = 'flex'; |                  wikiPageLink.style.display = 'flex'; | ||
|                 // اضافه کردن ویژگی باز کردن لینکها در پنجره جدید | |||
|                 addTargetBlankToIframeLinks(); | |||
|                  updateNavigationButtons(); |                  updateNavigationButtons(); | ||
|              } |              } | ||