2024-10-06 13:20:06 -03:00
|
|
|
/*
|
|
|
|
* 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: [
|
|
|
|
{
|
2025-01-22 18:03:51 -03:00
|
|
|
find: ".handleImageLoad)",
|
2024-10-06 13:20:06 -03:00
|
|
|
replacement: {
|
|
|
|
match: /(?<=null;return )\i\.\i&&\(\i\|\|!\i\.isAnimated.+?:(?=\i&&\(\i="png"\))/,
|
|
|
|
replace: ""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
});
|