mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-13 16:43:04 -04:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
bec7696ebc
6 changed files with 23 additions and 25 deletions
|
@ -487,13 +487,13 @@ export default definePlugin({
|
|||
],
|
||||
},
|
||||
|
||||
// Message content renderer
|
||||
{
|
||||
// Message content renderer
|
||||
find: ".SEND_FAILED,",
|
||||
replacement: {
|
||||
// Render editHistory in the deepest div for message content
|
||||
match: /(\)\("div",\{id:.+?children:\[)/,
|
||||
replace: "$1 (!!arguments[0].message.editHistory?.length && $self.renderEdits(arguments[0])),"
|
||||
// Render editHistory behind the message content
|
||||
match: /\.isFailed]:.+?children:\[/,
|
||||
replace: "$&arguments[0]?.message?.editHistory?.length>0&&$self.renderEdits(arguments[0]),"
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -388,15 +388,10 @@ export default definePlugin({
|
|||
find: "#{intl::CHANNEL_CALL_CURRENT_SPEAKER}",
|
||||
replacement: [
|
||||
{
|
||||
// Remove the divider and the open chat button for the HiddenChannelLockScreen
|
||||
match: /"more-options-popout"\)\),(?<=channel:(\i).+?inCall:(\i).+?)/,
|
||||
replace: (m, channel, inCall) => `${m}${inCall}||!$self.isHiddenChannel(${channel},true)&&`
|
||||
},
|
||||
{
|
||||
// Remove invite users button for the HiddenChannelLockScreen
|
||||
match: /"popup".{0,100}?if\((?<=channel:(\i).+?inCall:(\i).+?)/,
|
||||
replace: (m, channel, inCall) => `${m}(${inCall}||!$self.isHiddenChannel(${channel},true))&&`
|
||||
},
|
||||
// Remove the open chat button for the HiddenChannelLockScreen
|
||||
match: /(?<=&&)\i\.push\(.{0,120}"chat-spacer"/,
|
||||
replace: "(arguments[0]?.inCall||!$self.isHiddenChannel(arguments[0]?.channel,true))&&$&"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -459,8 +454,8 @@ export default definePlugin({
|
|||
},
|
||||
{
|
||||
// Remove the open chat button for the HiddenChannelLockScreen
|
||||
match: /"recents".+?&&(?=\(.+?channelId:(\i)\.id,showRequestToSpeakSidebar)/,
|
||||
replace: (m, channel) => `${m}!$self.isHiddenChannel(${channel})&&`
|
||||
match: /(?<=&&)\(0,\i\.jsxs?\).{0,180}\.buttonIcon/,
|
||||
replace: "!$self.isHiddenChannel(arguments[0]?.channel,true)&&$&"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -105,6 +105,9 @@ define(Function.prototype, "m", {
|
|||
}
|
||||
|
||||
const fileName = stack.match(/\/assets\/(.+?\.js)/)?.[1];
|
||||
if (fileName?.includes("libdiscore")) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Define a setter for the bundlePath property of WebpackRequire. Only Webpack instances which include chunk loading functionality,
|
||||
// like the main Discord Webpack, have this property.
|
||||
|
@ -587,7 +590,7 @@ function patchFactory(moduleId: PropertyKey, originalFactory: AnyModuleFactory):
|
|||
}
|
||||
|
||||
code = newCode;
|
||||
patchedSource = `// Webpack Module ${String(moduleId)} - Patched by ${pluginsList.join(", ")}\n${newCode}\n//# sourceURL=WebpackModule${String(moduleId)}`;
|
||||
patchedSource = `// Webpack Module ${String(moduleId)} - Patched by ${pluginsList.join(", ")}\n${newCode}\n//# sourceURL=file:///WebpackModule${String(moduleId)}`;
|
||||
patchedFactory = (0, eval)(patchedSource);
|
||||
|
||||
if (!patchedBy.has(patch.plugin)) {
|
||||
|
|
|
@ -753,7 +753,7 @@ export function extract(id: string | number) {
|
|||
// This module is NOT ACTUALLY USED! This means putting breakpoints will have NO EFFECT!!
|
||||
|
||||
0,${mod.toString()}
|
||||
//# sourceURL=ExtractedWebpackModule${id}
|
||||
//# sourceURL=file:///ExtractedWebpackModule${id}
|
||||
`;
|
||||
const extracted = (0, eval)(code);
|
||||
return extracted as Function;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue