From 6e60ebe83bf79e5d7565f4bb0f1c949bc4f07344 Mon Sep 17 00:00:00 2001 From: Fovway Date: Sun, 9 Mar 2025 12:44:41 +0000 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=B2=20=C2=AB?= =?UTF-8?q?/=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exit.js | 28 +++------------------------- reload.js | 15 +++------------ 2 files changed, 6 insertions(+), 37 deletions(-) diff --git a/exit.js b/exit.js index b5881b8..d390056 100644 --- a/exit.js +++ b/exit.js @@ -6,8 +6,9 @@ function sourceChange() { ` ); - - document.querySelector('.source-btn').addEventListener('click', function() { + + + $('.source-btn').on('hover:enter hover:click hover:touch', function() { if (Lampa.Platform.is('apple_tv')) window.location.assign('exit://exit'); if (Lampa.Platform.is("tizen")) @@ -17,29 +18,6 @@ function sourceChange() { if (Lampa.Platform.is("orsay")) Lampa.Orsay.exit(); if (Lampa.Platform.is("nw")) nw.Window.get().close(); }); - document.querySelector('.source-btn').addEventListener('touchend', function() { - if (Lampa.Platform.is('apple_tv')) - window.location.assign('exit://exit'); - if (Lampa.Platform.is("tizen")) - tizen.application.getCurrentApplication().exit(); - if (Lampa.Platform.is("webos")) window.close(); - if (Lampa.Platform.is("android")) Lampa.Android.exit(); - if (Lampa.Platform.is("orsay")) Lampa.Orsay.exit(); - if (Lampa.Platform.is("nw")) nw.Window.get().close(); - }); - document.querySelector('.source-btn').addEventListener('keydown', - function(event) { - if (event.key === 'Enter') { - if (Lampa.Platform.is('apple_tv')) - window.location.assign('exit://exit'); - if (Lampa.Platform.is("tizen")) - tizen.application.getCurrentApplication().exit(); - if (Lampa.Platform.is("webos")) window.close(); - if (Lampa.Platform.is("android")) Lampa.Android.exit(); - if (Lampa.Platform.is("orsay")) Lampa.Orsay.exit(); - if (Lampa.Platform.is("nw")) nw.Window.get().close(); - } - }); } if (window.appready) start(); else { diff --git a/reload.js b/reload.js index 2c967e9..7dea1f2 100644 --- a/reload.js +++ b/reload.js @@ -9,18 +9,9 @@ function reloadApp() { ); - document.querySelector('.reload--btn').addEventListener('click', function() { - location.reload(); - }); - document.querySelector('.reload--btn').addEventListener('touchend', function() { - location.reload(); - }); - document.querySelector('.reload--btn').addEventListener('keydown', - function(event) { - if(event.key === 'Enter') { - location.reload(); - } - }); + $('.reload--btn').on('hover:enter hover:click hover:touch', function() { + location.reload(); + }); } if (window.appready) start(); else {