summaryrefslogtreecommitdiff
path: root/src/scripts/quran.js
diff options
context:
space:
mode:
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';
}