mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 07:37:19 +02:00
Minor updates
This commit is contained in:
parent
0e03d4dc32
commit
2ecd995e47
@ -217,5 +217,9 @@
|
||||
border: 1px solid #2d2d2d;
|
||||
background: #212121;
|
||||
white-space: break-spaces;
|
||||
|
||||
&:hover {
|
||||
background: #272727;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -476,7 +476,7 @@ export function setupSettingsUi() {
|
||||
const $debugInfo = CE('div', {class: 'bx-debug-info'},
|
||||
createButton({
|
||||
label: 'Debug info',
|
||||
style: ButtonStyle.GHOST | ButtonStyle.FULL_WIDTH,
|
||||
style: ButtonStyle.GHOST | ButtonStyle.FULL_WIDTH | ButtonStyle.FOCUSABLE,
|
||||
onClick: e => {
|
||||
console.log(e);
|
||||
(e.target as HTMLElement).closest('button')?.nextElementSibling?.classList.toggle('bx-gone');
|
||||
@ -494,7 +494,7 @@ export function setupSettingsUi() {
|
||||
}
|
||||
},
|
||||
},
|
||||
}, JSON.stringify(debugInfo, null, ' ')),
|
||||
}, '```\n' + JSON.stringify(debugInfo, null, ' ') + '\n```'),
|
||||
);
|
||||
$wrapper.appendChild($debugInfo);
|
||||
|
||||
|
@ -14,7 +14,7 @@ type BxFlags = Partial<{
|
||||
|
||||
DeviceInfo: Partial<{
|
||||
deviceType: 'android' | 'android-tv' | 'webos' | 'unknown',
|
||||
userAgent: string,
|
||||
userAgent?: string,
|
||||
}>,
|
||||
}>
|
||||
|
||||
@ -33,7 +33,6 @@ const DEFAULT_FLAGS: BxFlags = {
|
||||
|
||||
DeviceInfo: {
|
||||
deviceType: 'unknown',
|
||||
userAgent: window.navigator.userAgent,
|
||||
},
|
||||
}
|
||||
|
||||
@ -42,4 +41,8 @@ try {
|
||||
delete window.BX_FLAGS;
|
||||
} catch (e) {}
|
||||
|
||||
if (!BX_FLAGS.DeviceInfo!.userAgent) {
|
||||
BX_FLAGS.DeviceInfo!.userAgent = window.navigator.userAgent;
|
||||
}
|
||||
|
||||
export const NATIVE_FETCH = window.fetch;
|
||||
|
Loading…
x
Reference in New Issue
Block a user