mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-07 08:07:18 +02:00
Show GamePass app's version (#85)
This commit is contained in:
parent
2f4396d948
commit
c520fde438
@ -1353,6 +1353,13 @@ function addCss() {
|
|||||||
background-color: #00753c;
|
background-color: #00753c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.better-xcloud-settings-app-version {
|
||||||
|
margin-top: 10px;
|
||||||
|
text-align: center;
|
||||||
|
color: #484848;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
.better-xcloud-settings-custom-user-agent {
|
.better-xcloud-settings-custom-user-agent {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -2297,6 +2304,13 @@ function injectSettingsButton($parent) {
|
|||||||
});
|
});
|
||||||
$wrapper.appendChild($reloadBtn);
|
$wrapper.appendChild($reloadBtn);
|
||||||
|
|
||||||
|
// Show Game Pass app version
|
||||||
|
try {
|
||||||
|
const appVersion = document.querySelector('meta[name=gamepass-app-version]').content;
|
||||||
|
const appDate = new Date(document.querySelector('meta[name=gamepass-app-date]').content).toISOString().substring(0, 10);
|
||||||
|
$wrapper.appendChild(CE('div', {'class': 'better-xcloud-settings-app-version'}, `GamePass app ${appVersion} (${appDate})`));
|
||||||
|
} catch (e) {}
|
||||||
|
|
||||||
// Add Settings UI to the web page
|
// Add Settings UI to the web page
|
||||||
const $pageContent = document.getElementById('PageContent');
|
const $pageContent = document.getElementById('PageContent');
|
||||||
$pageContent.parentNode.insertBefore($container, $pageContent);
|
$pageContent.parentNode.insertBefore($container, $pageContent);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user