fix regex and remove log

This commit is contained in:
sadan 2024-07-10 22:35:27 -04:00
parent add443e67b
commit 850b940306
No known key found for this signature in database

View file

@ -363,9 +363,8 @@ const expressionPickerPatch: NavContextMenuPatchCallback = (children, props: { t
function imageContextPatch(c, p: {
src: string
}){
console.log("passed", p);
if ("src" in p
&& /https:\/\/cdn\.discordapp\.com\/emojis\/(\d+)\.(gif|png).*/gm.test(p.src)
&& /https:\/\/cdn\.discordapp\.com\/emojis\/(\d+)\.[a-zA-Z]{3,4}.*/gm.test(p.src)
){
const matches = [...p.src.matchAll(/https:\/\/cdn\.discordapp\.com\/emojis\/(\d+)\.(gif|png).*/gm)];
if (!matches) return;