Update ImageUtilities.plugin.js

This commit is contained in:
Mirco Wittrien 2020-08-14 15:06:22 +02:00
parent 31f4ba6b97
commit b2b2d5f0cc
1 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ var ImageUtilities = (_ => {
return class ImageUtilities {
getName () {return "ImageUtilities";}
getVersion () {return "4.0.0";}
getVersion () {return "4.0.1";}
getAuthor () {return "DevilBro";}
@ -278,7 +278,7 @@ var ImageUtilities = (_ => {
injectItem (e, url) {
if (url && url.indexOf("discordapp.com/assets/") == -1 && !url.endsWith(".mp4")) {
url = url.replace(/^url\(|\)$|"|'/g, "").replace(/\?size\=\d+$/, "?size=4096");
url = url.replace(/^url\(|\)$|"|'/g, "").replace(/\?size\=\d+$/, "?size=4096").replace(/[\?\&](height|width)=\d+/g, "");
if (url.indexOf("https://images-ext-1.discordapp.net/external/") > -1) {
if (url.split("/https/").length != 1) url = "https://" + url.split("/https/")[url.split("/https/").length-1];
else if (url.split("/http/").length != 1) url = "http://" + url.split("/http/")[url.split("/http/").length-1];