Disable Onboarding screen

This commit is contained in:
redphx 2024-07-08 07:32:16 +07:00
parent 0f360d4be1
commit 6b2412ff27
2 changed files with 28 additions and 0 deletions

View File

@ -738,6 +738,26 @@ true` + text;
str = str.substring(0, index) + 'true ? null :' + str.substring(index);
return str;
},
// Override Storage.getSettings()
overrideStorageGetSettings(str: string) {
const text = '}getSetting(e){';
if (!str.includes(text)) {
return false;
}
const newCode = `
// console.log('setting', this.baseStorageKey, e);
if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
const settings = window.BX_EXPOSED.overrideSettings[this.baseStorageKey];
if (e in settings) {
return settings[e];
}
}
`;
str = str.replace(text, text + newCode);
return str;
}
};
let PATCH_ORDERS: PatchArray = [
@ -759,6 +779,8 @@ let PATCH_ORDERS: PatchArray = [
'enableTvRoutes',
'overrideStorageGetSettings',
getPref(PrefKey.UI_LAYOUT) !== 'default' && 'websiteLayout',
getPref(PrefKey.LOCAL_CO_OP_ENABLED) && 'supportLocalCoOp',
getPref(PrefKey.GAME_FORTNITE_FORCE_CONSOLE) && 'forceFortniteConsole',

View File

@ -109,4 +109,10 @@ export const BxExposed = {
handleControllerShortcut: ControllerShortcut.handle,
resetControllerShortcut: ControllerShortcut.reset,
overrideSettings: {
'Tv_settings': {
hasCompletedOnboarding: true,
},
},
};