From 889717be7dbc77a149feb87bb689174f57fb7d54 Mon Sep 17 00:00:00 2001 From: redphx <96280+redphx@users.noreply.github.com> Date: Tue, 1 Aug 2023 08:07:57 +0700 Subject: [PATCH] Show confirm dialog to refresh the stream after holding for 1s --- better-xcloud.user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/better-xcloud.user.js b/better-xcloud.user.js index a431d5b..5d84669 100644 --- a/better-xcloud.user.js +++ b/better-xcloud.user.js @@ -1835,7 +1835,8 @@ function injectVideoSettingsButton() { isHolding = false; holdTimeout = setTimeout(() => { isHolding = true; - }, 750); + confirm('Do you want to refresh the stream?') && window.location.reload(); + }, 1000); }; const onMouseUp = e => { holdTimeout && clearTimeout(holdTimeout); @@ -1843,7 +1844,6 @@ function injectVideoSettingsButton() { if (isHolding) { e.preventDefault(); e.stopPropagation(); - confirm('Do you want to refresh the stream?') && window.location.reload(); } isHolding = false; };