this repo has no description
1import { Patch } from "@moonlight-mod/types";
2
3export const patches: Patch[] = [
4 {
5 find: "isStaffPersonal:",
6 replace: {
7 match: /&&null!=this\.personalConnectionId/,
8 replacement: "||!0"
9 }
10 },
11 {
12 find: '"scientist:triggered"', // Scientist? Triggered.
13 replace: {
14 match: ".personal_connection_id",
15 replacement: ".personal_connection_id || true"
16 }
17 },
18
19 // Enable staff help menu
20 {
21 find: ".HEADER_BAR)",
22 replace: {
23 match: /&&\((.)\?\(0,/,
24 replacement: (_, isStaff) =>
25 `&&(((moonlight.getConfigOption("experiments","devtools")??false)?true:${isStaff})?(0,`
26 }
27 },
28 // staff help menu - visual refresh
29 {
30 find: '("AppTitleBar")',
31 replace: {
32 match: /{hasBugReporterAccess:(\i)}=\i\.\i\.useExperiment\({location:"HeaderBar"},{autoTrackExposure:!1}\);/,
33 replacement: (orig, isStaff) =>
34 `${orig}if(moonlight.getConfigOption("experiments","devtools")??false)${isStaff}=true;`
35 }
36 },
37 {
38 find: 'navId:"staff-help-popout",',
39 replace: {
40 match: /isDiscordDeveloper:(\i)}\),/,
41 replacement: (_, isStaff) =>
42 `isDiscordDeveloper:(moonlight.getConfigOption("experiments","devtools")??false)||${isStaff}}),`
43 }
44 },
45
46 // Enable further staff-locked options
47 {
48 find: "shouldShowLurkerModeUpsellPopout:",
49 replace: {
50 match: /\.useReducedMotion,isStaff:(.),/,
51 replacement: (_, isStaff) =>
52 `.useReducedMotion,isStaff:(moonlight.getConfigOption("experiments","staffSettings")??false)?true:${isStaff},`
53 }
54 }
55];