From 12efa76e679624563d508685ac17d411c3c4441e Mon Sep 17 00:00:00 2001 From: altaf-creator Date: Mon, 17 Jul 2023 14:16:21 +0700 Subject: Added zoom feature, Added sura index --- src/scripts/quran.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/scripts/quran.js') diff --git a/src/scripts/quran.js b/src/scripts/quran.js index c50d9c0..5fac7b5 100644 --- a/src/scripts/quran.js +++ b/src/scripts/quran.js @@ -78,7 +78,7 @@ function loadSura(xml, translationIndex, index) { var children = sura[suraIndex].children; - txt += "
    " + txt += "
      " for (var i = 0; i < children.length; i++) { txt += `
    1. ${children[i].getAttribute('text')}
    2. @@ -88,8 +88,7 @@ function loadSura(xml, translationIndex, index) { loadTranslation(index, translationIndex); - document.getElementById("header").innerHTML = metadata[3] + - " - " + sura[suraIndex].getAttribute('name') + ""; + document.getElementById("header").innerHTML = metadata[0] + ": " + metadata[3] + " - " + sura[suraIndex].getAttribute('name') + ""; document.getElementById("navbar-text").innerHTML = metadata[3] + " - " + sura[suraIndex].getAttribute('name') + ""; document.getElementById("subheader").innerHTML = metadata[1] + " Aya
      " + metadata[4]; @@ -169,7 +168,7 @@ function loadMetadataButtons(xml) { var index = sura[i].getAttribute('index'); var tname = sura[i].getAttribute('tname'); - document.getElementById("sidebar-sura").innerHTML += ` ${tname}`; + document.getElementById("sidebar-sura").innerHTML += ` ${index}: ${tname}`; } } @@ -200,4 +199,6 @@ function loadTranslationAya(xml, index, aya) { txt = children[i].getAttribute("text"); document.getElementById(`t-${i}`).innerHTML = txt; } + + updateZoom(); } -- cgit v1.2.3