Merge branch 'dev' into fix-modern-syntax
This commit is contained in:
commit
c8d880f578
4 changed files with 15 additions and 8 deletions
|
|
@ -51,11 +51,17 @@ export default definePlugin({
|
|||
// Show plugin name instead of "Built-In"
|
||||
{
|
||||
find: "#{intl::COMMANDS_OPTIONAL_COUNT}",
|
||||
replacement: {
|
||||
// ...children: p?.name
|
||||
match: /(?<=:(\i)\.displayDescription\}.{0,200}children:).{0,50}\.name(?=\}\))/,
|
||||
replace: "$1.plugin||($&)"
|
||||
}
|
||||
replacement: [
|
||||
{
|
||||
// ...children: p?.name
|
||||
match: /(?<=:(\i)\.displayDescription\}.{0,200}children:).{0,50}\.name(?=\}\))/,
|
||||
replace: "$1.plugin||($&)"
|
||||
},
|
||||
{
|
||||
match: /children:(?=\i\?\?\i\?\.name)(?<=command:(\i),.+?)/,
|
||||
replace: "children:$1.plugin??"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
});
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ export default definePlugin({
|
|||
find: ".handleSendMessage,onResize:",
|
||||
replacement: {
|
||||
// https://regex101.com/r/7iswuk/1
|
||||
match: /let (\i)=\i\.\i\.parse\((\i),.+?\.getSendMessageOptions\(\{.+?\}\);(?=.+?(\i)\.flags=)(?<=\)\(({.+?})\)\.then.+?)/,
|
||||
match: /let (\i)=\i\.\i\.parse\((\i),.+?\.getSendMessageOptions\(\{.+?\}\)?;(?=.+?(\i)\.flags=)(?<=\)\(({.+?})\)\.then.+?)/,
|
||||
replace: (m, parsedMessage, channel, replyOptions, extra) => m +
|
||||
`if(await Vencord.Api.MessageEvents._handlePreSend(${channel}.id,${parsedMessage},${extra},${replyOptions}))` +
|
||||
"return{shouldClear:false,shouldRefocus:true};"
|
||||
|
|
|
|||
|
|
@ -101,7 +101,8 @@ interface Modals {
|
|||
}>;
|
||||
}
|
||||
|
||||
export const Modals: Modals = mapMangledModuleLazy('??"thin")', {
|
||||
// TODO: move to new modal api
|
||||
export const Modals: Modals = mapMangledModuleLazy(".MODAL_ROOT_LEGACY,", {
|
||||
ModalRoot: filters.componentByCode('.MODAL,"aria-labelledby":'),
|
||||
ModalHeader: filters.componentByCode(",id:"),
|
||||
ModalContent: filters.componentByCode("scrollbarType:"),
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ export const TextInput = waitForComponent<t.TextInput>("TextInput", filters.comp
|
|||
export const TextArea = waitForComponent<t.TextArea>("TextArea", filters.componentByCode("this.getPaddingRight()},id:"));
|
||||
export const Select = waitForComponent<t.Select>("Select", filters.componentByCode('"Select"'));
|
||||
export const SearchableSelect = waitForComponent<t.SearchableSelect>("SearchableSelect", filters.componentByCode('"SearchableSelect"'));
|
||||
export const Slider = waitForComponent<t.Slider>("Slider", filters.componentByCode("`markDash${null=="));
|
||||
export const Slider = waitForComponent<t.Slider>("Slider", filters.componentByCode("markDash", "this.renderMark("));
|
||||
export const Popout = waitForComponent<t.Popout>("Popout", filters.componentByCode("ref:this.ref,", "renderPopout:this.renderPopout,"));
|
||||
export const Dialog = waitForComponent<t.Dialog>("Dialog", filters.componentByCode('role:"dialog",tabIndex:-1'));
|
||||
export const TabBar = waitForComponent("TabBar", filters.componentByCode("ref:this.tabBarRef,className:"));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue