fix ImageZoom & FakeProfileThemes (#3546)
Co-authored-by: Vendicated <vendicated@riseup.net>
This commit is contained in:
parent
4c315b6886
commit
8ec5b0a8d8
3 changed files with 5 additions and 10 deletions
|
|
@ -122,7 +122,7 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: "#{intl::USER_SETTINGS_RESET_PROFILE_THEME}",
|
find: "#{intl::USER_SETTINGS_RESET_PROFILE_THEME}",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /#{intl::USER_SETTINGS_RESET_PROFILE_THEME}\)}\)(?<=color:(\i),.{0,500}?color:(\i),.{0,500}?)/,
|
match: /#{intl::USER_SETTINGS_RESET_PROFILE_THEME}\).+?}\)(?=\])(?<=color:(\i),.{0,500}?color:(\i),.{0,500}?)/,
|
||||||
replace: "$&,$self.addCopy3y3Button({primary:$1,accent:$2})"
|
replace: "$&,$self.addCopy3y3Button({primary:$1,accent:$2})"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -171,14 +171,9 @@ export default definePlugin({
|
||||||
replace: `id:"${ELEMENT_ID}",$&`
|
replace: `id:"${ELEMENT_ID}",$&`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// This patch needs to be above the next one as it uses the zoomed class as an anchor
|
match: /(?<=null!=(\i)\?.{0,20})\i\.\i,{children:\1/,
|
||||||
match: /\.zoomed]:.+?,(?=children:)/,
|
replace: "'div',{onClick:e=>e.stopPropagation(),children:$1"
|
||||||
replace: "$&onClick:()=>{},"
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
match: /className:\i\(\)\(\i\.wrapper,.+?}\),/,
|
|
||||||
replace: ""
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
// Make media viewer options not hide when zoomed in with the default Discord feature
|
// Make media viewer options not hide when zoomed in with the default Discord feature
|
||||||
|
|
|
||||||
|
|
@ -250,7 +250,7 @@ export default definePlugin({
|
||||||
replace: (m, channel) => `${m}if($self.isHiddenChannel(${channel}))break;`
|
replace: (m, channel) => `${m}if($self.isHiddenChannel(${channel}))break;`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
match: /(?<="renderHeaderBar",\(\)=>{.+?hideSearch:(\i)\.isDirectory\(\))/,
|
match: /(?<="renderHeaderBar",\i=>{.+?hideSearch:(\i)\.isDirectory\(\))/,
|
||||||
replace: (_, channel) => `||$self.isHiddenChannel(${channel})`
|
replace: (_, channel) => `||$self.isHiddenChannel(${channel})`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue