mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-07 08:07:18 +02:00
Use a better method to skip feedback dialog
This commit is contained in:
parent
941ed0a00f
commit
bee190b867
@ -554,6 +554,16 @@ true` + text;
|
|||||||
str = str.replace(text, newCode);
|
str = str.replace(text, newCode);
|
||||||
return str;
|
return str;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
skipFeedbackDialog(str: string) {
|
||||||
|
const text = '&&this.shouldTransitionToFeedback(';
|
||||||
|
if (!str.includes(text)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
str = str.replace(text, '&& false ' + text);
|
||||||
|
return str;
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
let PATCH_ORDERS: PatchArray = [
|
let PATCH_ORDERS: PatchArray = [
|
||||||
@ -605,6 +615,9 @@ let PLAYING_PATCH_ORDERS: PatchArray = [
|
|||||||
// Patch volume control for combined audio+video stream
|
// Patch volume control for combined audio+video stream
|
||||||
getPref(PrefKey.AUDIO_ENABLE_VOLUME_CONTROL) && getPref(PrefKey.STREAM_COMBINE_SOURCES) && 'patchCombinedAudioVideoMediaStream',
|
getPref(PrefKey.AUDIO_ENABLE_VOLUME_CONTROL) && getPref(PrefKey.STREAM_COMBINE_SOURCES) && 'patchCombinedAudioVideoMediaStream',
|
||||||
|
|
||||||
|
// Skip feedback dialog
|
||||||
|
getPref(PrefKey.STREAM_DISABLE_FEEDBACK_DIALOG) && 'skipFeedbackDialog',
|
||||||
|
|
||||||
|
|
||||||
STATES.hasTouchSupport && getPref(PrefKey.STREAM_TOUCH_CONTROLLER) === 'all' && 'patchShowSensorControls',
|
STATES.hasTouchSupport && getPref(PrefKey.STREAM_TOUCH_CONTROLLER) === 'all' && 'patchShowSensorControls',
|
||||||
STATES.hasTouchSupport && getPref(PrefKey.STREAM_TOUCH_CONTROLLER) === 'all' && 'exposeTouchLayoutManager',
|
STATES.hasTouchSupport && getPref(PrefKey.STREAM_TOUCH_CONTROLLER) === 'all' && 'exposeTouchLayoutManager',
|
||||||
|
@ -90,7 +90,6 @@ export function injectStreamMenuButtons() {
|
|||||||
let $btnStreamSettings: HTMLElement;
|
let $btnStreamSettings: HTMLElement;
|
||||||
let $btnStreamStats: HTMLElement;
|
let $btnStreamStats: HTMLElement;
|
||||||
|
|
||||||
const PREF_DISABLE_FEEDBACK_DIALOG = getPref(PrefKey.STREAM_DISABLE_FEEDBACK_DIALOG);
|
|
||||||
const observer = new MutationObserver(mutationList => {
|
const observer = new MutationObserver(mutationList => {
|
||||||
mutationList.forEach(item => {
|
mutationList.forEach(item => {
|
||||||
if (item.type !== 'childList') {
|
if (item.type !== 'childList') {
|
||||||
@ -125,12 +124,6 @@ export function injectStreamMenuButtons() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PREF_DISABLE_FEEDBACK_DIALOG && $elm.className.startsWith('PostStreamFeedbackScreen')) {
|
|
||||||
const $btnClose = $elm.querySelector('button');
|
|
||||||
$btnClose && $btnClose.click();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Render badges
|
// Render badges
|
||||||
if ($elm.className?.startsWith('StreamMenu-module__container')) {
|
if ($elm.className?.startsWith('StreamMenu-module__container')) {
|
||||||
const $btnCloseHud = document.querySelector('button[class*=StreamMenu-module__backButton]');
|
const $btnCloseHud = document.querySelector('button[class*=StreamMenu-module__backButton]');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user