mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-07-31 10:26:42 +02:00
Show confirm dialog to refresh the stream after holding for 1s
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
Reference in New Issue
Block a user