diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/index.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/index.php b/app/index.php index b53bb43..72ca74b 100644 --- a/app/index.php +++ b/app/index.php @@ -66,7 +66,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $_PROFI </div> <div id="mobile-navbar" style="padding: 0 10px; border-bottom: 1px solid rgba(0, 0, 0, .1); height: 48px; top: var(--android-status-bar); left: 0; right: 0; position: fixed; display: none; grid-template-columns: max-content 1fr;"> - <div style="display: flex; align-items: center;" onclick="document.getElementById('ui').contentWindow.history.back();"> + <div style="display: flex; align-items: center;" onclick="window.back();"> <img alt="Back" src="/assets/icons/back-mobile.svg" style="height: 32px; width: 32px;"> </div> <div style="display: flex; align-items: center; margin-left: 10px;" id="mobile-navbar-title"></div> @@ -114,6 +114,16 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $_PROFI }); } + window.back = () => { + if (document.getElementById('ui').contentWindow.history.length > 1) { + document.getElementById('ui').contentWindow.history.back(); + } else { + if (window.MistAndroid) { + window.MistAndroid.quitApp(); + } + } + } + window.playlist = []; window.showLyrics = () => { |