mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-06 05:08:26 +02:00
Add Game Bar action to toggle renderer's visibility
This commit is contained in:
11
src/modules/shortcuts/shortcut-renderer.ts
Normal file
11
src/modules/shortcuts/shortcut-renderer.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export class RendererShortcut {
|
||||
static toggleVisibility(): boolean {
|
||||
const $mediaContainer = document.querySelector('#game-stream div[data-testid="media-container"]');
|
||||
if (!$mediaContainer) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$mediaContainer.classList.toggle('bx-gone');
|
||||
return !$mediaContainer.classList.contains('bx-gone');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user