new plugin FixImagesQuality
This commit is contained in:
parent
013c8d061d
commit
416d85dcf0
2 changed files with 26 additions and 0 deletions
3
src/plugins/fixImagesQuality/README.md
Normal file
3
src/plugins/fixImagesQuality/README.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Fix Images Quality
|
||||||
|
|
||||||
|
Prevents images from being loaded as webp, which can cause quality loss
|
23
src/plugins/fixImagesQuality/index.ts
Normal file
23
src/plugins/fixImagesQuality/index.ts
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
/*
|
||||||
|
* Vencord, a Discord client mod
|
||||||
|
* Copyright (c) 2024 Vendicated and contributors
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { Devs } from "@utils/constants";
|
||||||
|
import definePlugin from "@utils/types";
|
||||||
|
|
||||||
|
export default definePlugin({
|
||||||
|
name: "FixImagesQuality",
|
||||||
|
description: "Prevents images from being loaded as webp, which can cause quality loss",
|
||||||
|
authors: [Devs.Nuckyz],
|
||||||
|
patches: [
|
||||||
|
{
|
||||||
|
find: "getFormatQuality(){",
|
||||||
|
replacement: {
|
||||||
|
match: /(?<=null;return )\i\.\i&&\(\i\|\|!\i\.isAnimated.+?:(?=\i&&\(\i="png"\))/,
|
||||||
|
replace: ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
Loading…
Reference in a new issue