Skip to content

Commit b857e69

Browse files
committed
Fix image CSP
1 parent 6516d9b commit b857e69

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

SimpleDiscordCrypt.meta.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// ==UserScript==
22
// @name SimpleDiscordCrypt Extended
3-
// @version 1.9.1.2
3+
// @version 1.9.1.3
44
// ==/UserScript==

SimpleDiscordCrypt.user.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ==UserScript==
22
// @name SimpleDiscordCrypt Extended
33
// @namespace https://github.com/Ceiridge/SimpleDiscordCrypt-Extended
4-
// @version 1.9.1.2
4+
// @version 1.9.1.3
55
// @description I hope people won't start calling this SDC ^_^
66
// @author An0, leogx9r, Ceiridge
77
// @license LGPLv3 - https://www.gnu.org/licenses/lgpl-3.0.txt
@@ -2930,7 +2930,8 @@ async function decryptAttachment(key, keyHash, message, attachment, channelConfi
29302930
}
29312931
else {
29322932
let id = Patcher.FreeImageId++;
2933-
url = `https://raw.githubusercontent.com/Ceiridge/SimpleDiscordCrypt-Extended/master/images/internalkey1700.png#${id}`;
2933+
// Hacky fix for viewing images because of CSP
2934+
url = `https://media.tenor.com/RrTEJmKKjwsAAAAi/chub-cat.gif#${id}`;
29342935
let bitmap = await createImageBitmap(blob); //resets image rotation it seems
29352936
width = bitmap.width;
29362937
height = bitmap.height;

0 commit comments

Comments
 (0)