new plugin FixImagesQuality

This commit is contained in:
Nuckyz 2024-10-06 13:20:06 -03:00
parent 013c8d061d
commit 416d85dcf0
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
2 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,3 @@
# Fix Images Quality
Prevents images from being loaded as webp, which can cause quality loss

View 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: ""
}
}
]
});