diff options
Diffstat (limited to 'src/scripts')
-rw-r--r-- | src/scripts/quran.js | 17 | ||||
-rw-r--r-- | src/scripts/sura-list.js | 2 |
2 files changed, 14 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'; } diff --git a/src/scripts/sura-list.js b/src/scripts/sura-list.js index a799b02..abbae2e 100644 --- a/src/scripts/sura-list.js +++ b/src/scripts/sura-list.js @@ -20,6 +20,8 @@ function load() { for (var i = 0; i < windowBtns.length; i++) { windowBtns[i].style.display = 'grid'; } + + document.getElementById('openquran-home').href = 'index.html' } catch { var windowBtns = document.getElementsByClassName('window-button-container'); |