mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
24 lines
488 B
JavaScript
24 lines
488 B
JavaScript
(function () {
|
|
|
|
Dashboard.exit = function () {
|
|
|
|
if (navigator.app && navigator.app.exitApp) {
|
|
navigator.app.exitApp();
|
|
} else {
|
|
Dashboard.logout();
|
|
}
|
|
};
|
|
|
|
function onBackKeyDown(e) {
|
|
if (Dashboard.exitOnBack()) {
|
|
e.preventDefault();
|
|
Dashboard.exit();
|
|
}
|
|
else {
|
|
history.back();
|
|
}
|
|
}
|
|
|
|
document.addEventListener("backbutton", onBackKeyDown, false);
|
|
|
|
})(); |