mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-07 13:48:27 +02:00
Fix errors with setTimeout/setInterval
This commit is contained in:
@@ -23,7 +23,7 @@ export function onHistoryChanged(e: PopStateEvent) {
|
||||
return;
|
||||
}
|
||||
|
||||
setTimeout(RemotePlay.detect, 10);
|
||||
window.setTimeout(RemotePlay.detect, 10);
|
||||
|
||||
const $settings = document.querySelector('.bx-settings-container');
|
||||
if ($settings) {
|
||||
@@ -34,7 +34,7 @@ export function onHistoryChanged(e: PopStateEvent) {
|
||||
RemotePlay.detachPopup();
|
||||
|
||||
LoadingScreen.reset();
|
||||
setTimeout(checkHeader, 2000);
|
||||
window.setTimeout(checkHeader, 2000);
|
||||
|
||||
BxEvent.dispatch(window, BxEvent.STREAM_STOPPED);
|
||||
}
|
||||
|
@@ -543,7 +543,7 @@ export function interceptHttpRequests() {
|
||||
for (const blocked of BLOCKED_URLS) {
|
||||
if ((this as any)._url.startsWith(blocked)) {
|
||||
if (blocked === 'https://dc.services.visualstudio.com') {
|
||||
setTimeout(clearAllLogs, 1000);
|
||||
window.setTimeout(clearAllLogs, 1000);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@@ -37,7 +37,7 @@ export class Toast {
|
||||
Toast.#isShowing = true;
|
||||
|
||||
Toast.#timeout && clearTimeout(Toast.#timeout);
|
||||
Toast.#timeout = setTimeout(Toast.#hide, Toast.#DURATION);
|
||||
Toast.#timeout = window.setTimeout(Toast.#hide, Toast.#DURATION);
|
||||
|
||||
// Get values from item
|
||||
const [msg, status, _] = Toast.#stack.shift()!;
|
||||
|
Reference in New Issue
Block a user