aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/nitroBypass.ts
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2022-11-09 17:30:37 +0100
committerVendicated <vendicated@riseup.net>2022-11-09 17:30:48 +0100
commite0450531efa84c42e4857b78176f5e80de2ab12e (patch)
treedbf6849f623c4b86bb2bff2efd6295095e6f7fc1 /src/plugins/nitroBypass.ts
parentb032e9b6e30c456d0a569faa6ea962315822edb2 (diff)
downloadVencord-e0450531efa84c42e4857b78176f5e80de2ab12e.tar.gz
Vencord-e0450531efa84c42e4857b78176f5e80de2ab12e.tar.bz2
Vencord-e0450531efa84c42e4857b78176f5e80de2ab12e.zip
StickerSpoof: fix small resolutions; AnonymiseFiles: fix extension logic
Diffstat (limited to 'src/plugins/nitroBypass.ts')
-rw-r--r--src/plugins/nitroBypass.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/nitroBypass.ts b/src/plugins/nitroBypass.ts
index be77a4c..9e961a2 100644
--- a/src/plugins/nitroBypass.ts
+++ b/src/plugins/nitroBypass.ts
@@ -169,14 +169,14 @@ export default definePlugin({
const resolution = Settings.plugins.NitroBypass.stickerSize;
const canvas = document.createElement("canvas");
- canvas.width = width;
- canvas.height = height;
+ canvas.width = resolution;
+ canvas.height = resolution;
const ctx = canvas.getContext("2d", {
willReadFrequently: true
})!;
- const scale = resolution / width;
+ const scale = resolution / Math.max(width, height);
ctx.scale(scale, scale);
let lastImg: HTMLImageElement | null = null;