Update ImageUtilities.plugin.js
This commit is contained in:
parent
181dae5411
commit
539612bdd8
|
@ -14,7 +14,7 @@ module.exports = (_ => {
|
|||
"info": {
|
||||
"name": "ImageUtilities",
|
||||
"author": "DevilBro",
|
||||
"version": "4.2.7",
|
||||
"version": "4.2.8",
|
||||
"description": "Add a handful of options for images/emotes/avatars (direct download, reverse image search, zoom, copy image link, copy image to clipboard, gallery mode)"
|
||||
},
|
||||
"changeLog": {
|
||||
|
@ -955,7 +955,7 @@ module.exports = (_ => {
|
|||
isValid (url, type) {
|
||||
if (!url) return false;
|
||||
const file = url && (BDFDB.LibraryModules.URLParser.parse(url).pathname || "").toLowerCase();
|
||||
return file && (!type && (url.startsWith("https://images-ext-2.discordapp.net/") || Object.keys(fileTypes).some(t => file.endsWith(`/${t}`)) || file.endsWith(`.${t}`)) || type && Object.keys(fileTypes).filter(t => fileTypes[t][type]).some(t => file.endsWith(`/${t}`) || file.endsWith(`.${t}`)));
|
||||
return file && (!type && (url.startsWith("https://images-ext-2.discordapp.net/") || Object.keys(fileTypes).some(t => file.endsWith(`/${t}`) || file.endsWith(`.${t}`))) || type && Object.keys(fileTypes).filter(t => fileTypes[t][type]).some(t => file.endsWith(`/${t}`) || file.endsWith(`.${t}`)));
|
||||
}
|
||||
|
||||
downloadFile (url, path) {
|
||||
|
|
Loading…
Reference in New Issue