this repo has no description
1import { ExtensionWebpackModule, Patch } from "@moonlight-mod/types"; 2 3export const patches: Patch[] = [ 4 // dm list 5 { 6 find: ".interactiveSystemDM]:", 7 replace: [ 8 { 9 match: /decorators:(\i\.isSystemDM\(\)\?\(0,\i\.jsx\)\(.+?verified:!0}\):null)/, 10 replacement: (_, decorators) => 11 `decorators:require("componentEditor_dmList").default._patchDecorators([${decorators}],arguments[0])` 12 }, 13 { 14 match: /(?<=selected:\i,)children:\[/, 15 replacement: 'children:require("componentEditor_dmList").default._patchItems([' 16 }, 17 { 18 match: /(?<=(onMouseDown|nameplate):\i}\))]/, 19 replacement: "],arguments[0])" 20 } 21 ], 22 hardFail: true 23 }, 24 25 // member list 26 { 27 find: ".lostPermission", 28 replace: [ 29 { 30 match: /(?<=\(0,\i\.jsxs\)\(\i\.Fragment,{)children:(\[\i\(\),.+?\i\(\)])/, 31 replacement: (_, decorators) => 32 `children:require("componentEditor_memberList").default._patchDecorators(${decorators},arguments[0])` 33 }, 34 { 35 match: /name:null==\i\?\(0,\i\.jsx\)\("span"/, 36 replacement: (orig: string) => 37 `children:require("componentEditor_memberList").default._patchItems([],arguments[0]),${orig}` 38 } 39 ] 40 }, 41 42 // messages 43 { 44 find: '},"new-member")),', 45 replace: [ 46 { 47 match: /(?<=\.BADGES](=|:))(\i)(;|})/, 48 replacement: (_, leading, badges, trailing) => 49 `require("componentEditor_messages").default._patchUsernameBadges(${badges},arguments[0])${trailing}` 50 }, 51 { 52 match: /(?<=className:\i,)badges:(\i)/, 53 replacement: (_, badges) => 54 `badges:require("componentEditor_messages").default._patchBadges(${badges},arguments[0])` 55 }, 56 { 57 match: /(?<=username:\(0,\i\.jsxs\)\(\i\.Fragment,{)children:(\[.+?])}\),usernameSpanId:/, 58 replacement: (_, elements) => 59 `children:require("componentEditor_messages").default._patchUsername(${elements},arguments[0])}),usernameSpanId:` 60 } 61 ] 62 }, 63 { 64 find: '.provider&&"Discord"===', 65 replace: { 66 match: /(?<=\.container\),)children:(\[.+?this\.renderSuppressConfirmModal\(\),.+?\])}\)/, 67 replacement: (_, elements) => 68 `children:require("componentEditor_messages").default._patchAccessories(${elements},this.props)})` 69 } 70 } 71]; 72 73export const webpackModules: Record<string, ExtensionWebpackModule> = { 74 dmList: { 75 dependencies: [{ id: "react" }] 76 }, 77 memberList: { 78 dependencies: [{ id: "react" }] 79 }, 80 messages: { 81 dependencies: [{ id: "react" }] 82 } 83};