Update ImageUtilities.plugin.js
This commit is contained in:
parent
3c86d0dba1
commit
5542f12709
|
@ -2,7 +2,7 @@
|
|||
* @name ImageUtilities
|
||||
* @author DevilBro
|
||||
* @authorId 278543574059057154
|
||||
* @version 4.3.9
|
||||
* @version 4.4.0
|
||||
* @description Adds several Utilities for Images/Videos (Gallery, Download, Reverse Search, Zoom, Copy, etc.)
|
||||
* @invite Jx3TjNS
|
||||
* @donate https://www.paypal.me/MircoWittrien
|
||||
|
@ -17,8 +17,13 @@ module.exports = (_ => {
|
|||
"info": {
|
||||
"name": "ImageUtilities",
|
||||
"author": "DevilBro",
|
||||
"version": "4.3.9",
|
||||
"version": "4.4.0",
|
||||
"description": "Adds several Utilities for Images/Videos (Gallery, Download, Reverse Search, Zoom, Copy, etc.)"
|
||||
},
|
||||
"changeLog": {
|
||||
"fixed": {
|
||||
"Avatars/Icons": "No longer uses .WEBP type for Avatars and Icons"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -86,7 +91,7 @@ module.exports = (_ => {
|
|||
"png": {copyable: true, searchable: true, video: false},
|
||||
"svg": {copyable: false, searchable: false, video: false},
|
||||
"webm": {copyable: false, searchable: false, video: true},
|
||||
"webp": {copyable: true, searchable: true, video: false},
|
||||
"webp": {copyable: false, searchable: true, video: false},
|
||||
"wmv": {copyable: false, searchable: false, video: true}
|
||||
};
|
||||
|
||||
|
@ -504,18 +509,18 @@ module.exports = (_ => {
|
|||
if (e.instance.props.guild && this.settings.places.guildIcons) {
|
||||
let banner = BDFDB.DOMUtils.getParent(BDFDB.dotCN.guildheader, e.instance.props.target) || BDFDB.DOMUtils.getParent(BDFDB.dotCN.guildchannels, e.instance.props.target) && !e.instance.props.target.className && e.instance.props.target.parentElement.firstElementChild == e.instance.props.target;
|
||||
if (banner) {
|
||||
if (e.instance.props.guild.banner) this.injectItem(e, BDFDB.LibraryModules.IconUtils.getGuildBannerURL(e.instance.props.guild));
|
||||
if (e.instance.props.guild.banner) this.injectItem(e, (BDFDB.LibraryModules.IconUtils.getGuildBannerURL(e.instance.props.guild) || "").replace(".webp", ".png"));
|
||||
}
|
||||
else if (e.type != "GuildChannelListContextMenu") this.injectItem(e, e.instance.props.guild.getIconURL(), e.instance.props.guild.icon && BDFDB.LibraryModules.IconUtils.isAnimatedIconHash(e.instance.props.guild.icon) && e.instance.props.guild.getIconURL(true));
|
||||
else if (e.type != "GuildChannelListContextMenu") this.injectItem(e, (e.instance.props.guild.getIconURL() || "").replace(".webp", ".png"), e.instance.props.guild.icon && BDFDB.LibraryModules.IconUtils.isAnimatedIconHash(e.instance.props.guild.icon) && e.instance.props.guild.getIconURL(true));
|
||||
}
|
||||
}
|
||||
|
||||
onUserContextMenu (e) {
|
||||
if (e.instance.props.user && this.settings.places.userAvatars) this.injectItem(e, e.instance.props.user.getAvatarURL(), BDFDB.LibraryModules.IconUtils.isAnimatedIconHash(e.instance.props.user.avatar) && e.instance.props.user.getAvatarURL(null, true))
|
||||
if (e.instance.props.user && this.settings.places.userAvatars) this.injectItem(e, (e.instance.props.user.getAvatarURL() || "").replace(".webp", ".png"), BDFDB.LibraryModules.IconUtils.isAnimatedIconHash(e.instance.props.user.avatar) && e.instance.props.user.getAvatarURL(null, true))
|
||||
}
|
||||
|
||||
onGroupDMContextMenu (e) {
|
||||
if (e.instance.props.channel && e.instance.props.channel.isGroupDM() && this.settings.places.groupIcons) this.injectItem(e, BDFDB.DMUtils.getIcon(e.instance.props.channel.id));
|
||||
if (e.instance.props.channel && e.instance.props.channel.isGroupDM() && this.settings.places.groupIcons) this.injectItem(e, (BDFDB.DMUtils.getIcon(e.instance.props.channel.id) || "").replace(".webp", ".png"));
|
||||
}
|
||||
|
||||
onNativeContextMenu (e) {
|
||||
|
|
Loading…
Reference in New Issue