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