-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.11.6 #45
base: main
Are you sure you want to change the base?
1.11.6 #45
Changes from 9 commits
4e32126
8d0f312
ff82532
aab09ac
8f65d3c
e88af36
3de6615
11715da
0f38441
721aca6
678da62
c326801
5eb4435
c530071
4391fcc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -165,8 +165,35 @@ export default definePlugin({ | |
{ | ||
find: ".contain,SCALE_DOWN:", | ||
replacement: { | ||
match: /\.slide,\i\),/g, | ||
replace: `$&id:"${ELEMENT_ID}",` | ||
match: /imageClassName:/, | ||
replace: `id:"${ELEMENT_ID}",$&` | ||
} | ||
}, | ||
|
||
{ | ||
find: ".dimensionlessImage,", | ||
replacement: [ | ||
{ | ||
match: /className:\i\.media,/, | ||
replace: `id:"${ELEMENT_ID}",$&` | ||
}, | ||
{ | ||
// This patch needs to be above the next one as it uses the zoomed class as an anchor | ||
match: /\.zoomed]:.+?,(?=children:)/, | ||
replace: "$&onClick:()=>{}," | ||
}, | ||
{ | ||
match: /className:\i\(\)\(\i\.wrapper,.+?}\),/, | ||
replace: "" | ||
}, | ||
] | ||
}, | ||
// Make media viewer options not hide when zoomed in with the default Discord feature | ||
{ | ||
find: '="FOCUS_SENSITIVE",', | ||
replacement: { | ||
match: /(?<=\.hidden]:)\i/, | ||
replace: "false" | ||
} | ||
Comment on lines
+192
to
197
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed media viewer options visibility when zoomed. This patch ensures that media viewer options remain visible even when zoomed in with Discord's default feature by forcing the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. whats the actual issue youre addressing here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Scyye The issue being addressed is that normally when you zoom into an image using Discord's built-in zoom feature, the media viewer options (like the download button, fullscreen button, etc.) disappear because Discord hides them. This patch forces those controls to remain visible even when zoomed in, giving users better access to those options while they're examining zoomed images. Without this fix, users would have to zoom out first just to access those controls, which creates a poor user experience. |
||
}, | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Simplified Stores implementation by using cached fluxStores.
Good refactor that replaces a complex dynamic getter implementation with a direct reference to the cached
Webpack.fluxStores
. This change: