An00nymushun / DiscordFreeEmojis

229 stars 119 forks source link

Size of emotes #26

Open Vyxxxx opened 3 years ago

Vyxxxx commented 3 years ago

Is there a way to make emotes default send as size 32 instead of 64 or 128 whatever it's sending as?

marcussacana commented 3 years ago

Yes, just change in the .plugin.js source, find for: ?size=64, then change to 32... save the plugin and reload the discord.

Vyxxxx commented 3 years ago

Yes, just change in the .plugin.js source, find for: ?size=64, then change to 32... save the plugin and reload the discord.

Thanks! That's what I had planned to do but I was unsure which one to edit, appreciate it!

81322068 commented 3 years ago

Any way to change the size in the userscript version?

marcussacana commented 3 years ago

https://github.com/An00nymushun/DiscordFreeEmojis/blob/7bb933027ae6bd65c557d141574be390b3c1942e/DiscordFreeEmojis.user.js#L113 I didn't tested, but try change emoji.url to emoji.url + "?size=32"

81322068 commented 3 years ago

Thanks for your help, but nope that doesn't work. result.content = result.content.replace(`<${emoji.animated ? "a" : ""}:${emoji.originalName || emoji.name}:${emoji.id}>`, emoji.url + "?size=32");

marcussacana commented 3 years ago

Maybe the emoji.url isn't just a url then, you will need put after this like something like console.log(emoji.url); and see the value to we know what can be done after that.

81322068 commented 3 years ago

Oh I think I got the issue:. emoji.url is https://cdn.discordapp.com/emojis/824467565900201994.png?v=1 here if I remove ?v=1 and replace it with ?size=32 it works. https://cdn.discordapp.com/emojis/824467565900201994.png?size=32

Is there a way to change the code to remove ?v=1 and replace it with ?size=32?

Withern10 commented 3 years ago

yeah could anyone please try to find a way?

cyan-2048 commented 3 years ago

+ &size=40

you no longer need to remove ?v=1

cuanim commented 3 years ago

Thank you cyan, Had to add Quotations to make it work tho + "&size=64"

cyan-2048 commented 3 years ago

oh shockers i forgot to add quotes sorry for that

An00nymushun commented 3 years ago

There is a 64px userscript version, it would be way easier to edit that instead