mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-09 14:43:03 -04:00
Fix ImageZoom
Also fixes the image modal being off centre when having the plugin enabled Co-Authored-By: sadan <117494111+sadan4@users.noreply.github.com>
This commit is contained in:
parent
a11ccde40f
commit
0af820c874
6 changed files with 28 additions and 28 deletions
|
@ -156,14 +156,10 @@ export default definePlugin({
|
|||
|
||||
patches: [
|
||||
{
|
||||
find: "Messages.OPEN_IN_BROWSER",
|
||||
find: ".contain,SCALE_DOWN:",
|
||||
replacement: {
|
||||
// there are 2 image thingies. one for carosuel and one for the single image.
|
||||
// so thats why i added global flag.
|
||||
// also idk if this patch is good, should it be more specific?
|
||||
// https://regex101.com/r/xfvNvV/1
|
||||
match: /return.{1,200}\.wrapper.{1,200}src:\i,/g,
|
||||
replace: `$&id: '${ELEMENT_ID}',`
|
||||
match: /\.slide,\i\),/g,
|
||||
replace: `$&id:"${ELEMENT_ID}",`
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -185,13 +181,6 @@ export default definePlugin({
|
|||
replace: "$&$self.unMountMagnifier();"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
find: ".carouselModal",
|
||||
replacement: {
|
||||
match: /(?<=\.carouselModal.{0,100}onClick:)\i,/,
|
||||
replace: "()=>{},"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue