mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-07 16:17:20 +02:00
Show confirm dialog to refresh the stream after holding for 1s
This commit is contained in:
parent
4b0f0784ae
commit
889717be7d
@ -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;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user