mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-06 05:08:26 +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;
|
isHolding = false;
|
||||||
holdTimeout = setTimeout(() => {
|
holdTimeout = setTimeout(() => {
|
||||||
isHolding = true;
|
isHolding = true;
|
||||||
}, 750);
|
confirm('Do you want to refresh the stream?') && window.location.reload();
|
||||||
|
}, 1000);
|
||||||
};
|
};
|
||||||
const onMouseUp = e => {
|
const onMouseUp = e => {
|
||||||
holdTimeout && clearTimeout(holdTimeout);
|
holdTimeout && clearTimeout(holdTimeout);
|
||||||
@@ -1843,7 +1844,6 @@ function injectVideoSettingsButton() {
|
|||||||
if (isHolding) {
|
if (isHolding) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
confirm('Do you want to refresh the stream?') && window.location.reload();
|
|
||||||
}
|
}
|
||||||
isHolding = false;
|
isHolding = false;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user