From 6cfb9278c10f0fae4709930161f70f902cc1c17a Mon Sep 17 00:00:00 2001 From: altaf-creator <64111012+altaf-creator@users.noreply.github.com> Date: Tue, 9 May 2023 21:52:30 +0700 Subject: New sidebar, sura.html improvements --- src/scripts/quran.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/scripts/quran.js') diff --git a/src/scripts/quran.js b/src/scripts/quran.js index 76c18bf..c50d9c0 100644 --- a/src/scripts/quran.js +++ b/src/scripts/quran.js @@ -23,22 +23,29 @@ function getUrlVars() { function quranOnLoad() { var a = getUrlVars()["sura"]; - load(a, tIndex); + + if (a) { + load(a, tIndex); + } else { + load(1, tIndex) + } + loadSuraButtons(); try { process.versions['electron']; - + var windowBtns = document.getElementsByClassName('window-button-container'); - + for (var i = 0; i < windowBtns.length; i++) { windowBtns[i].style.display = 'grid'; } - + document.getElementById('openquran-link').href = 'index.html' + document.getElementById('openquran-home').href = 'index.html' } catch { var windowBtns = document.getElementsByClassName('window-button-container'); - + for (var i = 0; i < windowBtns.length; i++) { windowBtns[i].style.display = 'none'; } -- cgit v1.2.3