From 33b2b36e2b0681f49cc8b8b3536082ca423a6c55 Mon Sep 17 00:00:00 2001 From: redphx <96280+redphx@users.noreply.github.com> Date: Fri, 12 Jul 2024 06:19:30 +0700 Subject: [PATCH] Revert "Remove website's version detection" This reverts commit 91ab57fa29864c86d234eb276fceb57bb4edb6f6. --- src/modules/ui/global-settings.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/modules/ui/global-settings.ts b/src/modules/ui/global-settings.ts index 3cf7aef..20ab05d 100644 --- a/src/modules/ui/global-settings.ts +++ b/src/modules/ui/global-settings.ts @@ -428,6 +428,13 @@ export function setupSettingsUi() { }, `❤️ ${t('support-better-xcloud')}`); $wrapper.appendChild($donationLink); + // Show Game Pass app version + try { + const appVersion = (document.querySelector('meta[name=gamepass-app-version]') as HTMLMetaElement).content; + const appDate = new Date((document.querySelector('meta[name=gamepass-app-date]') as HTMLMetaElement).content).toISOString().substring(0, 10); + $wrapper.appendChild(CE('div', {'class': 'bx-settings-app-version'}, `xCloud website version ${appVersion} (${appDate})`)); + } catch (e) {} + $container.appendChild($wrapper); // Add Settings UI to the web page