From 992605690fb89180470a876c8bebcc34fc5efe54 Mon Sep 17 00:00:00 2001 From: redphx <96280+redphx@users.noreply.github.com> Date: Mon, 15 Apr 2024 07:56:42 +0700 Subject: [PATCH] Minor fixes --- better-xcloud.user.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/better-xcloud.user.js b/better-xcloud.user.js index 5311932..56e52d1 100644 --- a/better-xcloud.user.js +++ b/better-xcloud.user.js @@ -12194,16 +12194,19 @@ function handleDeepLink() { return; } + let handled = false const observer = new MutationObserver(mutationList => { mutationList.forEach(mutation => { - if (mutation.type !== 'childList') { + if (handled || mutation.type !== 'childList') { return; } const target = mutation.target; - if (target.className && target.className.startsWith('AllGamesRow')) { - localRedirect(path); + if (!handled && target.className && target.className.startsWith('AllGamesRow')) { observer.disconnect(); + + handled = true; + localRedirect(path); return; } });