summaryrefslogtreecommitdiff
path: root/src/scripts/quran.js
diff options
context:
space:
mode:
authoraltaf-creator <64111012+altaf-creator@users.noreply.github.com>2023-05-09 21:52:30 +0700
committeraltaf-creator <64111012+altaf-creator@users.noreply.github.com>2023-05-09 21:52:30 +0700
commit6cfb9278c10f0fae4709930161f70f902cc1c17a (patch)
tree8da5e004504aef6d06925c0b6eec6fa24ddb92d8 /src/scripts/quran.js
parentd19c1cbfd7930bc1f8bd6e9317e5f31d1d5c9213 (diff)
New sidebar, sura.html improvements
Diffstat (limited to 'src/scripts/quran.js')
-rw-r--r--src/scripts/quran.js17
1 files changed, 12 insertions, 5 deletions
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';
}